Bug 756555 - Intersect the upload region with the valid region. r=ajuma
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 18 May 2012 21:19:43 -0400
changeset 98479 ab3f805f32102b91ff3d10081f1b55e6d4864dac
parent 98478 b03d90c2504efef092671d3e3f36ff411e8fa8f8
child 98480 18a75044ea04cee09812b38c87b5220c923714e9
push id1116
push userlsblakk@mozilla.com
push dateMon, 16 Jul 2012 19:38:18 +0000
treeherdermozilla-beta@95f959a8b4dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajuma
bugs756555
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 756555 - Intersect the upload region with the valid region. r=ajuma
gfx/layers/opengl/TiledThebesLayerOGL.cpp
--- a/gfx/layers/opengl/TiledThebesLayerOGL.cpp
+++ b/gfx/layers/opengl/TiledThebesLayerOGL.cpp
@@ -161,16 +161,20 @@ TiledThebesLayerOGL::ProcessUploadQueue(
     mReusableTileStore->HarvestTiles(this,
                                      &mVideoMemoryTiledBuffer,
                                      mVideoMemoryTiledBuffer.GetValidRegion(),
                                      mMainMemoryTiledBuffer.GetValidRegion(),
                                      mVideoMemoryTiledBuffer.GetResolution(),
                                      resolution);
   }
 
+  // If we coalesce uploads while the layers' valid region is changing we will
+  // end up trying to upload area outside of the valid region. (bug 756555)
+  mRegionToUpload.And(mRegionToUpload, mMainMemoryTiledBuffer.GetValidRegion());
+
   mVideoMemoryTiledBuffer.Upload(&mMainMemoryTiledBuffer,
                                  mMainMemoryTiledBuffer.GetValidRegion(),
                                  mRegionToUpload, resolution);
   mValidRegion = mVideoMemoryTiledBuffer.GetValidRegion();
 
   mMainMemoryTiledBuffer.ReadUnlock();
   // Release all the tiles by replacing the tile buffer with an empty
   // tiled buffer. This will prevent us from doing a double unlock when