Bug 1274726. Clamp scaled image before repeating during prescale and repeat on OS X. r=jrmuizel
authorMason Chang <mchang@mozilla.com>
Fri, 03 Jun 2016 13:30:21 -0700
changeset 339495 2b4b4972c8a575ba3d06d7d4c214b6f941ab2c80
parent 339494 4e03f2bc5a99f4d19785cf04e4f3ed4a22f65aa4
child 339496 0fe8a8bde7f03cf80825a434f4a3fc2c58d69a84
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1274726
milestone49.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 1274726. Clamp scaled image before repeating during prescale and repeat on OS X. r=jrmuizel
gfx/thebes/gfxUtils.cpp
--- a/gfx/thebes/gfxUtils.cpp
+++ b/gfx/thebes/gfxUtils.cpp
@@ -599,17 +599,19 @@ PrescaleAndTileDrawable(gfxDrawable* aDr
     return false;
   }
 
   RefPtr<gfxContext> tmpCtx = gfxContext::ForDrawTarget(scaledDT);
   MOZ_ASSERT(tmpCtx); // already checked the target above
 
   scaledDT->SetTransform(ToMatrix(scaleMatrix));
   gfxRect gfxImageRect(aImageRect.x, aImageRect.y, aImageRect.width, aImageRect.height);
-  aDrawable->Draw(tmpCtx, gfxImageRect, aExtendMode, aSamplingFilter, 1.0, gfxMatrix());
+
+  // Since this is just the scaled image, we don't want to repeat anything yet.
+  aDrawable->Draw(tmpCtx, gfxImageRect, ExtendMode::CLAMP, aSamplingFilter, 1.0, gfxMatrix());
 
   RefPtr<SourceSurface> scaledImage = scaledDT->Snapshot();
 
   {
     gfxContextMatrixAutoSaveRestore autoSR(aContext);
     Matrix withoutScale = ToMatrix(aContext->CurrentMatrix());
     DrawTarget* destDrawTarget = aContext->GetDrawTarget();