mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 939598. Always call BeginTransaction before EndTransaction. r=mattwoodrow
This commit is contained in:
parent
cfd80862b1
commit
90ba9aaf83
@ -168,10 +168,11 @@ LayerManagerComposite::BeginTransactionWithDrawTarget(DrawTarget* aTarget)
|
||||
bool
|
||||
LayerManagerComposite::EndEmptyTransaction(EndTransactionFlags aFlags)
|
||||
{
|
||||
mInTransaction = false;
|
||||
|
||||
if (!mRoot)
|
||||
NS_ASSERTION(mInTransaction, "Didn't call BeginTransaction?");
|
||||
if (!mRoot) {
|
||||
mInTransaction = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
EndTransaction(nullptr, nullptr);
|
||||
return true;
|
||||
@ -182,6 +183,7 @@ LayerManagerComposite::EndTransaction(DrawThebesLayerCallback aCallback,
|
||||
void* aCallbackData,
|
||||
EndTransactionFlags aFlags)
|
||||
{
|
||||
NS_ASSERTION(mInTransaction, "Didn't call BeginTransaction?");
|
||||
mInTransaction = false;
|
||||
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
|
@ -500,6 +500,15 @@ CompositorParent::ScheduleComposition()
|
||||
|
||||
void
|
||||
CompositorParent::Composite()
|
||||
{
|
||||
if (CanComposite()) {
|
||||
mLayerManager->BeginTransaction();
|
||||
}
|
||||
CompositeInTransaction();
|
||||
}
|
||||
|
||||
void
|
||||
CompositorParent::CompositeInTransaction()
|
||||
{
|
||||
profiler_tracing("Paint", "Composite", TRACING_INTERVAL_START);
|
||||
PROFILER_LABEL("CompositorParent", "Composite");
|
||||
@ -564,7 +573,7 @@ CompositorParent::ComposeToTarget(DrawTarget* aTarget)
|
||||
mLayerManager->BeginTransactionWithDrawTarget(aTarget);
|
||||
// Since CanComposite() is true, Composite() must end the layers txn
|
||||
// we opened above.
|
||||
Composite();
|
||||
CompositeInTransaction();
|
||||
}
|
||||
|
||||
bool
|
||||
@ -629,10 +638,7 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||
}
|
||||
}
|
||||
ScheduleComposition();
|
||||
LayerManagerComposite *layerComposite = mLayerManager->AsLayerManagerComposite();
|
||||
if (layerComposite) {
|
||||
layerComposite->NotifyShadowTreeTransaction();
|
||||
}
|
||||
mLayerManager->NotifyShadowTreeTransaction();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -230,7 +230,8 @@ protected:
|
||||
bool* aSuccess);
|
||||
virtual bool DeallocPLayerTransactionParent(PLayerTransactionParent* aLayers);
|
||||
virtual void ScheduleTask(CancelableTask*, int);
|
||||
virtual void Composite();
|
||||
void Composite();
|
||||
void CompositeInTransaction();
|
||||
virtual void ComposeToTarget(gfx::DrawTarget* aTarget);
|
||||
|
||||
void SetEGLSurfaceSize(int width, int height);
|
||||
|
Loading…
Reference in New Issue
Block a user