зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1561235. Check the type of the PathBuilder instead of the DrawTarget. r=mstange
The draw target might give us a different type. Differential Revision: https://phabricator.services.mozilla.com/D36830 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
02f77cdcee
Коммит
ca49b31c2a
|
@ -149,13 +149,14 @@ ScaledFontDWrite::ScaledFontDWrite(IDWriteFontFace* aFontFace,
|
|||
|
||||
already_AddRefed<Path> ScaledFontDWrite::GetPathForGlyphs(
|
||||
const GlyphBuffer& aBuffer, const DrawTarget* aTarget) {
|
||||
if (aTarget->GetBackendType() != BackendType::DIRECT2D &&
|
||||
aTarget->GetBackendType() != BackendType::DIRECT2D1_1) {
|
||||
return ScaledFontBase::GetPathForGlyphs(aBuffer, aTarget);
|
||||
}
|
||||
|
||||
RefPtr<PathBuilder> pathBuilder = aTarget->CreatePathBuilder();
|
||||
|
||||
if (pathBuilder->GetBackendType() != BackendType::DIRECT2D &&
|
||||
pathBuilder->GetBackendType() != BackendType::DIRECT2D1_1) {
|
||||
return ScaledFontBase::GetPathForGlyphs(aBuffer, aTarget);
|
||||
}
|
||||
|
||||
PathBuilderD2D* pathBuilderD2D =
|
||||
static_cast<PathBuilderD2D*>(pathBuilder.get());
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче