author | Ethan Lin <ethlin@mozilla.com> |
Tue, 31 May 2016 16:07:38 +0800 | |
changeset 340692 | d813f7d5f90cba36d4401e970f4b559cb3153f72 |
parent 340691 | 2c86039b1c6868c2606d343e0906c645468c3fcc |
child 340693 | 373e67c2caaddfec3d3901e038804543c3da9afb |
push id | 1183 |
push user | raliiev@mozilla.com |
push date | Mon, 05 Sep 2016 20:01:49 +0000 |
treeherder | mozilla-release@3148731bed45 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mstange |
bugs | 1275478 |
milestone | 49.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
|
--- a/layout/svg/nsSVGIntegrationUtils.cpp +++ b/layout/svg/nsSVGIntegrationUtils.cpp @@ -459,17 +459,18 @@ GenerateMaskSurface(const nsSVGIntegrati gfxRect clipExtents = ctx.GetClipExtents(); IntRect maskSurfaceRect = RoundedOut(ToRect(clipExtents)); ctx.Restore(); // Mask composition result on CoreGraphic::A8 surface is not correct // when mask-mode is not add(source over). Switch to skia when CG backend // detected. RefPtr<DrawTarget> maskDT = - (ctx.GetDrawTarget()->GetBackendType() == BackendType::COREGRAPHICS) + (ctx.GetDrawTarget()->GetBackendType() == BackendType::COREGRAPHICS || + ctx.GetDrawTarget()->GetBackendType() == BackendType::DIRECT2D1_1) ? Factory::CreateDrawTarget(BackendType::SKIA, maskSurfaceRect.Size(), SurfaceFormat::A8) : ctx.GetDrawTarget()->CreateSimilarDrawTarget(maskSurfaceRect.Size(), SurfaceFormat::A8); RefPtr<gfxContext> maskContext = gfxContext::ForDrawTarget(maskDT); // Set ctx's matrix on maskContext, offset by the maskSurfaceRect's position. // This makes sure that we combine the masks in device space.