Bug 1480620. Replace WebRender's use of DrawTargetTiled.
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 08 Aug 2018 02:55:23 +0000
changeset 430452 94117544b4f596c77a7e401f3b07590c5931f0a1
parent 430451 fcf0193311b07f01b62eaa3c0aa53606ce5c5deb
child 430453 7c89cea1ed350b7a4a8572e0c39918f053f23613
push id34405
push userncsoregi@mozilla.com
push dateWed, 08 Aug 2018 09:57:26 +0000
treeherdermozilla-central@c65991f3fa10 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1480620
milestone63.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 1480620. Replace WebRender's use of DrawTargetTiled. This replaces WebRender's use of DrawTargetTiled which was just trying to apply offset. Differential Revision: https://phabricator.services.mozilla.com/D2906
gfx/webrender_bindings/Moz2DImageRenderer.cpp
--- a/gfx/webrender_bindings/Moz2DImageRenderer.cpp
+++ b/gfx/webrender_bindings/Moz2DImageRenderer.cpp
@@ -250,26 +250,20 @@ static bool Moz2DRenderCallback(const Ra
     aFormat,
     uninitialized
   );
 
   if (!dt) {
     return false;
   }
 
+  auto origin = gfx::IntPoint(0, 0);
   if (aTileOffset) {
-    // It's overkill to use a TiledDrawTarget for a single tile
-    // but it was the easiest way to get the offset handling working
-    gfx::TileSet tileset;
-    gfx::Tile tile;
-    tile.mDrawTarget = dt;
-    tile.mTileOrigin = gfx::IntPoint(aTileOffset->x * *aTileSize, aTileOffset->y * *aTileSize);
-    tileset.mTiles = &tile;
-    tileset.mTileCount = 1;
-    dt = gfx::Factory::CreateTiledDrawTarget(tileset);
+    origin = gfx::IntPoint(aTileOffset->x * *aTileSize, aTileOffset->y * *aTileSize);
+    dt = gfx::Factory::CreateOffsetDrawTarget(dt, origin);
   }
 
   if (aDirtyRect) {
     Rect dirty(aDirtyRect->origin.x, aDirtyRect->origin.y, aDirtyRect->size.width, aDirtyRect->size.height);
     dt->PushClipRect(dirty);
   }
 
   struct Reader {