mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 976766 - Clear layer's buffers when ClearCachedResources() r=nical
This commit is contained in:
parent
27b7fe9eb2
commit
11b8051865
@ -57,6 +57,8 @@ public:
|
|||||||
|
|
||||||
virtual ~CanvasClient() {}
|
virtual ~CanvasClient() {}
|
||||||
|
|
||||||
|
virtual void Clear() {};
|
||||||
|
|
||||||
virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) = 0;
|
virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) = 0;
|
||||||
|
|
||||||
virtual void Updated() { }
|
virtual void Updated() { }
|
||||||
@ -80,6 +82,11 @@ public:
|
|||||||
return TextureInfo(COMPOSITABLE_IMAGE);
|
return TextureInfo(COMPOSITABLE_IMAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void Clear() MOZ_OVERRIDE
|
||||||
|
{
|
||||||
|
mBuffer = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) MOZ_OVERRIDE;
|
virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual bool AddTextureClient(TextureClient* aTexture) MOZ_OVERRIDE
|
virtual bool AddTextureClient(TextureClient* aTexture) MOZ_OVERRIDE
|
||||||
@ -113,6 +120,11 @@ public:
|
|||||||
return TextureInfo(COMPOSITABLE_IMAGE);
|
return TextureInfo(COMPOSITABLE_IMAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void Clear() MOZ_OVERRIDE
|
||||||
|
{
|
||||||
|
mBuffer = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) MOZ_OVERRIDE;
|
virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void OnDetach() MOZ_OVERRIDE
|
virtual void OnDetach() MOZ_OVERRIDE
|
||||||
|
@ -56,6 +56,13 @@ public:
|
|||||||
|
|
||||||
virtual void RenderLayer();
|
virtual void RenderLayer();
|
||||||
|
|
||||||
|
virtual void ClearCachedResources()
|
||||||
|
{
|
||||||
|
if (mCanvasClient) {
|
||||||
|
mCanvasClient->Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
|
virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
|
||||||
{
|
{
|
||||||
aAttrs = CanvasLayerAttributes(mFilter, mBounds);
|
aAttrs = CanvasLayerAttributes(mFilter, mBounds);
|
||||||
|
@ -206,7 +206,12 @@ public:
|
|||||||
typedef RotatedContentBuffer::PaintState PaintState;
|
typedef RotatedContentBuffer::PaintState PaintState;
|
||||||
typedef RotatedContentBuffer::ContentType ContentType;
|
typedef RotatedContentBuffer::ContentType ContentType;
|
||||||
|
|
||||||
virtual void Clear() { RotatedContentBuffer::Clear(); }
|
virtual void Clear()
|
||||||
|
{
|
||||||
|
RotatedContentBuffer::Clear();
|
||||||
|
mTextureClient = nullptr;
|
||||||
|
mTextureClientOnWhite = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
virtual PaintState BeginPaintBuffer(ThebesLayer* aLayer,
|
virtual PaintState BeginPaintBuffer(ThebesLayer* aLayer,
|
||||||
uint32_t aFlags) MOZ_OVERRIDE
|
uint32_t aFlags) MOZ_OVERRIDE
|
||||||
@ -424,6 +429,13 @@ public:
|
|||||||
}
|
}
|
||||||
virtual ~ContentClientDoubleBuffered() {}
|
virtual ~ContentClientDoubleBuffered() {}
|
||||||
|
|
||||||
|
virtual void Clear() MOZ_OVERRIDE
|
||||||
|
{
|
||||||
|
ContentClientRemoteBuffer::Clear();
|
||||||
|
mFrontClient = nullptr;
|
||||||
|
mFrontClientOnWhite = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void SwapBuffers(const nsIntRegion& aFrontUpdatedRegion) MOZ_OVERRIDE;
|
virtual void SwapBuffers(const nsIntRegion& aFrontUpdatedRegion) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void PrepareFrame() MOZ_OVERRIDE;
|
virtual void PrepareFrame() MOZ_OVERRIDE;
|
||||||
|
Loading…
Reference in New Issue
Block a user