Bug 1013784 - Implement ClearRect for BasicCompositor. r=Cwiiis

This commit is contained in:
Matt Woodrow 2014-05-22 14:36:26 +12:00
parent 212cd95ad4
commit 37b1f0f705
3 changed files with 9 additions and 1 deletions

View File

@ -311,7 +311,7 @@ public:
/*
* Clear aRect on current render target.
*/
virtual void ClearRect(const gfx::Rect& aRect) { }
virtual void ClearRect(const gfx::Rect& aRect) = 0;
/**
* Start a new frame.

View File

@ -373,6 +373,12 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect,
buffer->PopClip();
}
void
BasicCompositor::ClearRect(const gfx::Rect& aRect)
{
mRenderTarget->mDrawTarget->ClearRect(aRect);
}
void
BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
const gfx::Rect *aClipRectIn,

View File

@ -84,6 +84,8 @@ public:
gfx::Float aOpacity,
const gfx::Matrix4x4 &aTransform) MOZ_OVERRIDE;
virtual void ClearRect(const gfx::Rect& aRect) MOZ_OVERRIDE;
virtual void BeginFrame(const nsIntRegion& aInvalidRegion,
const gfx::Rect *aClipRectIn,
const gfx::Matrix& aTransform,