diff --git a/gfx/layers/Compositor.h b/gfx/layers/Compositor.h index d9de13d761f..bba249b2156 100644 --- a/gfx/layers/Compositor.h +++ b/gfx/layers/Compositor.h @@ -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. diff --git a/gfx/layers/basic/BasicCompositor.cpp b/gfx/layers/basic/BasicCompositor.cpp index 8e2f4589367..ba8c8eebbeb 100644 --- a/gfx/layers/basic/BasicCompositor.cpp +++ b/gfx/layers/basic/BasicCompositor.cpp @@ -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, diff --git a/gfx/layers/basic/BasicCompositor.h b/gfx/layers/basic/BasicCompositor.h index f7116aac72f..7e472d1b35d 100644 --- a/gfx/layers/basic/BasicCompositor.h +++ b/gfx/layers/basic/BasicCompositor.h @@ -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,