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

Unified Diff: src/gpu/GrBitmapTextContext.cpp

Issue 135683006: Add fallback code for TextContexts that don't support all features (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix nits Created 6 years, 11 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 | « include/gpu/GrTextContext.h ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBitmapTextContext.cpp
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp
index ff81b2d2c20e40744457d930b0f4c59a8b544e8c..488aa137e9a14f5c72033df5d74dedcea9d639ae 100755
--- a/src/gpu/GrBitmapTextContext.cpp
+++ b/src/gpu/GrBitmapTextContext.cpp
@@ -19,6 +19,7 @@
#include "effects/GrCustomCoordsTextureEffect.h"
#include "SkAutoKern.h"
+#include "SkDraw.h"
#include "SkGlyphCache.h"
#include "SkGpuDevice.h"
#include "SkGr.h"
@@ -28,6 +29,10 @@ static const int kGlyphCoordsAttributeIndex = 1;
SK_CONF_DECLARE(bool, c_DumpFontCache, "gpu.dumpFontCache", false,
"Dump the contents of the font cache before every purge.");
+bool GrBitmapTextContext::CanDraw(const SkPaint& paint, const SkMatrix& ctm) {
+ return !SkDraw::ShouldDrawTextAsPaths(paint, ctm);
+}
+
GrBitmapTextContext::GrBitmapTextContext(GrContext* context,
const GrPaint& grPaint,
const SkPaint& skPaint,
« no previous file with comments | « include/gpu/GrTextContext.h ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698