From 07510ca0605cc81f6d3954a17a985184565a0135 Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Tue, 12 Aug 2014 18:46:16 -0400 Subject: [PATCH] Bug 1052857 - Overdraw should report dst pixels, not src pixels. r=jrmuizel --- gfx/layers/opengl/CompositorOGL.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index aff372271f7d..60ea8ffbff1d 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -1059,7 +1059,12 @@ CompositorOGL::DrawQuad(const Rect& aRect, maskType = MaskType::MaskNone; } - mPixelsFilled += aRect.width * aRect.height; + { + // XXX: This doesn't handle 3D transforms. It also doesn't handled rotated + // quads. Fix me. + const Rect destRect = aTransform.TransformBounds(aRect); + mPixelsFilled += destRect.width * destRect.height; + } // Determine the color if this is a color shader and fold the opacity into // the color since color shaders don't have an opacity uniform.