Bug 1347094 - Fix SkiaGL canvas drawing of large images. r=mchang, a=jcristau FIREFOX_52_0_2_BUILD1 FIREFOX_52_0_2_RELEASE
authorLee Salzman <lsalzman@mozilla.com>
Wed, 15 Mar 2017 13:57:18 -0400
changeset 369634 e81854d6ce91f3174774a50c9c5813c33b9aac58
parent 369633 0f3b930b3ef74cda0c336cc790ad60b2333e9867
child 369635 9a3506a37e59b8d40fd812c0df9722ac2f97fdb7
child 369637 1a705ff1629a12efa882c94a300d3a6db8c66f15
push id1407
push userryanvm@gmail.com
push dateThu, 23 Mar 2017 17:49:35 +0000
treeherdermozilla-release@e81854d6ce91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmchang, jcristau
bugs1347094
milestone52.0.2
Bug 1347094 - Fix SkiaGL canvas drawing of large images. r=mchang, a=jcristau MozReview-Commit-ID: Cw5EkXQj06t
gfx/skia/skia/src/gpu/SkGpuDevice.cpp
--- a/gfx/skia/skia/src/gpu/SkGpuDevice.cpp
+++ b/gfx/skia/skia/src/gpu/SkGpuDevice.cpp
@@ -1029,17 +1029,17 @@ void SkGpuDevice::drawBitmapTile(const S
     sk_sp<GrColorSpaceXform> colorSpaceXform =
         GrColorSpaceXform::Make(bitmap.colorSpace(), fDrawContext->getColorSpace());
 
     SkScalar iw = 1.f / texture->width();
     SkScalar ih = 1.f / texture->height();
 
     SkMatrix texMatrix;
     // Compute a matrix that maps the rect we will draw to the src rect.
-    texMatrix.setRectToRect(dstRect, srcRect, SkMatrix::kStart_ScaleToFit);
+    texMatrix.setRectToRect(dstRect, srcRect, SkMatrix::kFill_ScaleToFit);
     texMatrix.postScale(iw, ih);
 
     // Construct a GrPaint by setting the bitmap texture as the first effect and then configuring
     // the rest from the SkPaint.
     sk_sp<GrFragmentProcessor> fp;
 
     if (needsTextureDomain && (SkCanvas::kStrict_SrcRectConstraint == constraint)) {
         // Use a constrained texture domain to avoid color bleeding