Bug 1129467 - Apply the tile offset to tiles when initializing DrawTargetTiled. r=Bas
authorNicolas Silva <nsilva@mozilla.com>
Thu, 05 Feb 2015 11:09:57 +0100
changeset 227610 953be9e34875073d44b41addb9c1c5828eb9b513
parent 227609 31fde84fdb6440557c4eedf568eba6628b94510e
child 227611 b63d7e80709ab25a49c7d74a00434d317d6e0475
push id55172
push usernsilva@mozilla.com
push dateThu, 05 Feb 2015 10:10:10 +0000
treeherdermozilla-inbound@953be9e34875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs1129467
milestone38.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 1129467 - Apply the tile offset to tiles when initializing DrawTargetTiled. r=Bas
gfx/2d/DrawTargetTiled.cpp
--- a/gfx/2d/DrawTargetTiled.cpp
+++ b/gfx/2d/DrawTargetTiled.cpp
@@ -38,16 +38,18 @@ DrawTargetTiled::Init(const TileSet& aTi
     uint32_t newXMost = max(mRect.XMost(),
                             mTiles[i].mTileOrigin.x + mTiles[i].mDrawTarget->GetSize().width);
     uint32_t newYMost = max(mRect.YMost(),
                             mTiles[i].mTileOrigin.y + mTiles[i].mDrawTarget->GetSize().height);
     mRect.x = min(mRect.x, mTiles[i].mTileOrigin.x);
     mRect.y = min(mRect.y, mTiles[i].mTileOrigin.y);
     mRect.width = newXMost - mRect.x;
     mRect.height = newYMost - mRect.y;
+    mTiles[i].mDrawTarget->SetTransform(Matrix::Translation(mTiles[i].mTileOrigin.x,
+                                                            mTiles[i].mTileOrigin.y));
   }
   mFormat = mTiles[0].mDrawTarget->GetFormat();
   return true;
 }
 
 TemporaryRef<SourceSurface>
 DrawTargetTiled::Snapshot()
 {