forked from mirrors/gecko-dev
Bug 1739661. Avoid using D2D when drawing SVG. r=aosmond
This avoids using D2D when creating a cached SVG image. We can still hit D2D if we're not caching, but that should be less common. Differential Revision: https://phabricator.services.mozilla.com/D130513
This commit is contained in:
parent
fc11ef0b3f
commit
f3335d09ea
1 changed files with 6 additions and 0 deletions
|
|
@ -1080,6 +1080,12 @@ already_AddRefed<SourceSurface> VectorImage::CreateSurface(
|
|||
aParams.context ? aParams.context->GetDrawTarget()->GetBackendType()
|
||||
: gfxPlatform::GetPlatform()->GetDefaultContentBackend();
|
||||
|
||||
if (backend == BackendType::DIRECT2D1_1) {
|
||||
// We don't want to draw arbitrary content with D2D anymore
|
||||
// because it doesn't support PushLayerWithBlend so switch to skia
|
||||
backend = BackendType::SKIA;
|
||||
}
|
||||
|
||||
// Try to create an imgFrame, initializing the surface it contains by drawing
|
||||
// our gfxDrawable into it. (We use FILTER_NEAREST since we never scale here.)
|
||||
auto frame = MakeNotNull<RefPtr<imgFrame>>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue