Bug 1008573 - Simplify D3D10 invalid region before we clear the surface. r=Bas, a=sledru
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 13 May 2014 11:46:54 +1200
changeset 199396 9374e6fdae90b06465d8e15e96aaa10f7be3f8a9
parent 199395 9cc143b882877695bc633cc4d50ddf07d96d2042
child 199397 e53f3ba82db80ff49770acd1abbc5bb639ce7402
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas, sledru
bugs1008573
milestone31.0a2
Bug 1008573 - Simplify D3D10 invalid region before we clear the surface. r=Bas, a=sledru
gfx/layers/d3d10/ThebesLayerD3D10.cpp
--- a/gfx/layers/d3d10/ThebesLayerD3D10.cpp
+++ b/gfx/layers/d3d10/ThebesLayerD3D10.cpp
@@ -399,26 +399,26 @@ void
 ThebesLayerD3D10::DrawRegion(nsIntRegion &aRegion, SurfaceMode aMode)
 {
   nsIntRect visibleRect = mVisibleRegion.GetBounds();
 
   if (!mD2DSurface && !mDrawTarget) {
     return;
   }
 
+  aRegion.SimplifyOutwardByArea(100 * 100);
+
   nsRefPtr<gfxASurface> destinationSurface;
   
   if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA) {
     FillTexturesBlackWhite(aRegion, visibleRect.TopLeft());
   } else {
     destinationSurface = mD2DSurface;
   }
 
-  aRegion.SimplifyOutwardByArea(100 * 100);
-
   MOZ_ASSERT(mDrawTarget);
   nsRefPtr<gfxContext> context = new gfxContext(mDrawTarget);
 
   context->Translate(gfxPoint(-visibleRect.x, -visibleRect.y));
   if (aMode == SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA) {
     nsIntRegionRectIterator iter(aRegion);
     const nsIntRect *iterRect;
     while ((iterRect = iter.Next())) {