Bug 1347094 - Fix SkiaGL canvas drawing of large images. r=mchang, a=jcristau release
authorLee Salzman <lsalzman@mozilla.com>
Wed, 15 Mar 2017 13:57:18 -0400
changeset 387977 e81854d6ce91f3174774a50c9c5813c33b9aac58
parent 387976 0f3b930b3ef74cda0c336cc790ad60b2333e9867
push idunknown
push userunknown
push dateunknown
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