mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 993019 - Handle scheduling rendering task for cross-process rotation. r=mattwoodrow, r=nical
This commit is contained in:
parent
93944b130b
commit
10b9bf0872
@ -738,11 +738,11 @@ SetShadowProperties(Layer* aLayer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
CompositorParent::ScheduleRotationOnCompositorThread(const TargetConfig& aTargetConfig,
|
||||||
const TargetConfig& aTargetConfig,
|
bool aIsFirstPaint)
|
||||||
bool aIsFirstPaint,
|
|
||||||
bool aScheduleComposite)
|
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(IsInCompositorThread());
|
||||||
|
|
||||||
if (!aIsFirstPaint &&
|
if (!aIsFirstPaint &&
|
||||||
!mCompositionManager->IsFirstPaint() &&
|
!mCompositionManager->IsFirstPaint() &&
|
||||||
mCompositionManager->RequiresReorientation(aTargetConfig.orientation())) {
|
mCompositionManager->RequiresReorientation(aTargetConfig.orientation())) {
|
||||||
@ -752,6 +752,15 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
|||||||
mForceCompositionTask = NewRunnableMethod(this, &CompositorParent::ForceComposition);
|
mForceCompositionTask = NewRunnableMethod(this, &CompositorParent::ForceComposition);
|
||||||
ScheduleTask(mForceCompositionTask, gfxPrefs::OrientationSyncMillis());
|
ScheduleTask(mForceCompositionTask, gfxPrefs::OrientationSyncMillis());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||||
|
const TargetConfig& aTargetConfig,
|
||||||
|
bool aIsFirstPaint,
|
||||||
|
bool aScheduleComposite)
|
||||||
|
{
|
||||||
|
ScheduleRotationOnCompositorThread(aTargetConfig, aIsFirstPaint);
|
||||||
|
|
||||||
// Instruct the LayerManager to update its render bounds now. Since all the orientation
|
// Instruct the LayerManager to update its render bounds now. Since all the orientation
|
||||||
// change, dimension change would be done at the stage, update the size here is free of
|
// change, dimension change would be done at the stage, update the size here is free of
|
||||||
@ -1250,7 +1259,12 @@ CrossProcessCompositorParent::ShadowLayersUpdated(
|
|||||||
bool aScheduleComposite)
|
bool aScheduleComposite)
|
||||||
{
|
{
|
||||||
uint64_t id = aLayerTree->GetId();
|
uint64_t id = aLayerTree->GetId();
|
||||||
|
|
||||||
MOZ_ASSERT(id != 0);
|
MOZ_ASSERT(id != 0);
|
||||||
|
MOZ_ASSERT(sIndirectLayerTrees[id].mParent);
|
||||||
|
|
||||||
|
sIndirectLayerTrees[id].mParent->ScheduleRotationOnCompositorThread(aTargetConfig, aIsFirstPaint);
|
||||||
|
|
||||||
Layer* shadowRoot = aLayerTree->GetRoot();
|
Layer* shadowRoot = aLayerTree->GetRoot();
|
||||||
if (shadowRoot) {
|
if (shadowRoot) {
|
||||||
SetShadowProperties(shadowRoot);
|
SetShadowProperties(shadowRoot);
|
||||||
|
@ -129,6 +129,12 @@ public:
|
|||||||
virtual void ScheduleComposition();
|
virtual void ScheduleComposition();
|
||||||
void NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint, bool aScheduleComposite);
|
void NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint, bool aScheduleComposite);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check rotation info and schedule a rendering task if needed.
|
||||||
|
* Only can be called from compositor thread.
|
||||||
|
*/
|
||||||
|
void ScheduleRotationOnCompositorThread(const TargetConfig& aTargetConfig, bool aIsFirstPaint);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the unique layer tree identifier that corresponds to the root
|
* Returns the unique layer tree identifier that corresponds to the root
|
||||||
* tree of this compositor.
|
* tree of this compositor.
|
||||||
|
Loading…
Reference in New Issue
Block a user