Index: src/gpu/GrDistanceFieldTextContext.cpp |
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp |
index a1f5ce66608bac5cdf9ab934faffde042257f25d..939da9423a451ccbc90c7ff8802a232f4d8b33bb 100755 |
--- a/src/gpu/GrDistanceFieldTextContext.cpp |
+++ b/src/gpu/GrDistanceFieldTextContext.cpp |
@@ -7,6 +7,7 @@ |
#include "GrDistanceFieldTextContext.h" |
#include "GrAtlas.h" |
+#include "GrBitmapTextContext.h" |
#include "GrDrawTarget.h" |
#include "GrDrawTargetCaps.h" |
#include "GrFontScaler.h" |
@@ -80,6 +81,16 @@ GrDistanceFieldTextContext::GrDistanceFieldTextContext(GrContext* context, |
fVertexBounds.setLargestInverted(); |
} |
+GrDistanceFieldTextContext* GrDistanceFieldTextContext::Create(GrContext* context, |
+ const SkDeviceProperties& props, |
+ bool enable) { |
+ GrDistanceFieldTextContext* textContext = SkNEW_ARGS(GrDistanceFieldTextContext, |
+ (context, props, enable)); |
+ textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, props); |
+ |
+ return textContext; |
+} |
+ |
GrDistanceFieldTextContext::~GrDistanceFieldTextContext() { |
this->flush(); |
SkSafeSetNull(fGammaTexture); |
@@ -197,7 +208,7 @@ static void setup_gamma_texture(GrContext* context, const SkGlyphCache* cache, |
} |
} |
-void GrDistanceFieldTextContext::drawText(const GrPaint& paint, const SkPaint& skPaint, |
+void GrDistanceFieldTextContext::onDrawText(const GrPaint& paint, const SkPaint& skPaint, |
const char text[], size_t byteLength, |
SkScalar x, SkScalar y) { |
SkASSERT(byteLength == 0 || text != NULL); |
@@ -272,7 +283,7 @@ void GrDistanceFieldTextContext::drawText(const GrPaint& paint, const SkPaint& s |
this->finish(); |
} |
-void GrDistanceFieldTextContext::drawPosText(const GrPaint& paint, const SkPaint& skPaint, |
+void GrDistanceFieldTextContext::onDrawPosText(const GrPaint& paint, const SkPaint& skPaint, |
const char text[], size_t byteLength, |
const SkScalar pos[], int scalarsPerPosition, |
const SkPoint& offset) { |