Bug 1712855 - Fix assertion when recording SVG image blobs with non-integer translation transforms. r=jrmuizel
authorAndrew Osmond <aosmond@mozilla.com>
Tue, 22 Jun 2021 16:10:42 +0000
changeset 584035 7b80ff096f0e773869eed18f1be25da39ab4ad6e
parent 584034 13c36121f7aa52f63da17acdf10c9b3ebc62f092
child 584036 d6827a0e26d0c8f7e27e73a460c9b82c3d88f4f7
push id145413
push useraosmond@mozilla.com
push dateTue, 22 Jun 2021 16:33:53 +0000
treeherderautoland@7b80ff096f0e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1712855
milestone91.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 1712855 - Fix assertion when recording SVG image blobs with non-integer translation transforms. r=jrmuizel When we rasterized SVG images on the main thread of the content process, we would call gfxUtils::DrawPixelSnapped with aUseOptimalFillOp set to false. We should do the same when recording them. Differential Revision: https://phabricator.services.mozilla.com/D116398
image/SourceSurfaceBlobImage.cpp
--- a/image/SourceSurfaceBlobImage.cpp
+++ b/image/SourceSurfaceBlobImage.cpp
@@ -208,17 +208,17 @@ Maybe<BlobImageKeyData> SourceSurfaceBlo
     RefPtr<gfxContext> ctx = gfxContext::CreateOrNull(dt);
     MOZ_ASSERT(ctx);  // Already checked the draw target above.
 
     ctx->SetMatrix(
         ctx->CurrentMatrix().PreTranslate(-imageRect.x, -imageRect.y));
 
     gfxUtils::DrawPixelSnapped(ctx, svgDrawable, SizeDouble(mSize), region,
                                SurfaceFormat::OS_RGBA, SamplingFilter::POINT,
-                               mImageFlags);
+                               mImageFlags, /* aUseOptimalFillOp */ false);
   }
 
   recorder->FlushItem(imageRectOrigin);
   recorder->Finish();
 
   if (!validFonts) {
     gfxCriticalNote << "Failed serializing fonts for blob vector image";
     return Nothing();