b=763449 Finish X requests on mROFrontBuffer before deleting shadow layer r=cjones

--HG--
extra : rebase_source : 7381b234a29d648afdf76eff1f1e89f6e5cd88b5
This commit is contained in:
Karl Tomlinson 2012-09-25 16:20:41 +12:00
parent 56296ed6df
commit 5248b8f1c7
4 changed files with 15 additions and 8 deletions

View File

@ -281,6 +281,17 @@ private:
AutoBufferTracker& operator=(const AutoBufferTracker&) MOZ_DELETE;
};
BasicShadowableThebesLayer::~BasicShadowableThebesLayer()
{
// Finish any use of mROFrontBuffer since the last ForwardTransaction(),
// before the Shadow frees the surface.
if (OptionalThebesBuffer::Tnull_t != mROFrontBuffer.type()) {
ShadowLayerForwarder::PlatformSyncBeforeUpdate();
}
DestroyBackBuffer();
MOZ_COUNT_DTOR(BasicShadowableThebesLayer);
}
void
BasicShadowableThebesLayer::PaintThebes(gfxContext* aContext,
Layer* aMaskLayer,

View File

@ -121,11 +121,7 @@ public:
{
MOZ_COUNT_CTOR(BasicShadowableThebesLayer);
}
virtual ~BasicShadowableThebesLayer()
{
DestroyBackBuffer();
MOZ_COUNT_DTOR(BasicShadowableThebesLayer);
}
virtual ~BasicShadowableThebesLayer();
virtual void PaintThebes(gfxContext* aContext,
Layer* aMaskLayer,

View File

@ -177,7 +177,7 @@ ShadowLayerForwarder::PlatformSyncBeforeUpdate()
// operations on the back buffers before handing them to the
// parent, otherwise the surface might be used by the parent's
// Display in between two operations queued by our Display.
XSync(DefaultXDisplay(), False);
FinishX(DefaultXDisplay());
}
}

View File

@ -319,6 +319,8 @@ public:
virtual int32_t GetMaxTextureSize() const { return mMaxTextureSize; }
void SetMaxTextureSize(int32_t aMaxTextureSize) { mMaxTextureSize = aMaxTextureSize; }
static void PlatformSyncBeforeUpdate();
protected:
ShadowLayerForwarder();
@ -379,8 +381,6 @@ private:
bool PlatformDestroySharedSurface(SurfaceDescriptor* aSurface);
static void PlatformSyncBeforeUpdate();
Transaction* mTxn;
int32_t mMaxTextureSize;
LayersBackend mParentBackend;