Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 650273003: Change GrTextContext fallbacks to be a linked list chain. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix include Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.h ('k') | src/gpu/GrStencilAndCoverTextContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.h ('k') | src/gpu/GrStencilAndCoverTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698