зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1231643 - Part 1. Create skia-A8-surface for mask composition when backendtype of the source DrawTarget is CG; r=mstange
MozReview-Commit-ID: J0oIhhTowk7 --HG-- extra : rebase_source : 0825caa3824a369d4a59a2ed8dc1c877bb4b0509
This commit is contained in:
Родитель
3b81e9dd7d
Коммит
644959b4eb
|
@ -567,7 +567,17 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(gfxContext& aContext,
|
|||
clipRect = aContext.GetClipExtents();
|
||||
}
|
||||
IntRect drawRect = RoundedOut(ToRect(clipRect));
|
||||
RefPtr<DrawTarget> targetDT = aContext.GetDrawTarget()->CreateSimilarDrawTarget(drawRect.Size(), SurfaceFormat::A8);
|
||||
|
||||
// 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> targetDT =
|
||||
(aContext.GetDrawTarget()->GetBackendType() == BackendType::COREGRAPHICS) ?
|
||||
Factory::CreateDrawTarget(BackendType::SKIA, drawRect.Size(),
|
||||
SurfaceFormat::A8) :
|
||||
aContext.GetDrawTarget()->CreateSimilarDrawTarget(drawRect.Size(),
|
||||
SurfaceFormat::A8);
|
||||
|
||||
if (!targetDT || !targetDT->IsValid()) {
|
||||
aContext.Restore();
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче