Bug 1066679: Make DrawTargetDWrite::GetPathsForGlyphs recognize D2D 1.1. r=jrmuizel
authorBas Schouten <bschouten@mozilla.com>
Sun, 14 Sep 2014 23:52:46 +0200
changeset 721 6fdd21b55fd9
parent 720 b100f11163b6
child 722 ec470e7e4b8e
push id274
push userbschouten@mozilla.com
push dateTue, 23 Sep 2014 16:10:56 +0000
reviewersjrmuizel
bugs1066679
Bug 1066679: Make DrawTargetDWrite::GetPathsForGlyphs recognize D2D 1.1. r=jrmuizel
ScaledFontDWrite.cpp
--- a/ScaledFontDWrite.cpp
+++ b/ScaledFontDWrite.cpp
@@ -304,17 +304,17 @@ ScaledFontDWrite::ScaledFontDWrite(uint8
   if (FAILED(factory->CreateFontFace(DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &ff, aIndex, DWRITE_FONT_SIMULATIONS_NONE, byRef(mFontFace)))) {
     gfxWarning() << "Failed to create font face from font file data!";
   }
 }
 
 TemporaryRef<Path>
 ScaledFontDWrite::GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aTarget)
 {
-  if (aTarget->GetBackendType() != BackendType::DIRECT2D) {
+  if (aTarget->GetBackendType() != BackendType::DIRECT2D && aTarget->GetBackendType() != BackendType::DIRECT2D1_1) {
     return ScaledFontBase::GetPathForGlyphs(aBuffer, aTarget);
   }
 
   RefPtr<PathBuilder> pathBuilder = aTarget->CreatePathBuilder();
 
   PathBuilderD2D *pathBuilderD2D =
     static_cast<PathBuilderD2D*>(pathBuilder.get());