Index: src/gpu/GrDistanceFieldTextContext.cpp |
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp |
index 505ee39539fa2bc3d746f457d147c2f217bb4619..96cce76d3ba8fede03274e78a71a539a686964df 100755 |
--- a/src/gpu/GrDistanceFieldTextContext.cpp |
+++ b/src/gpu/GrDistanceFieldTextContext.cpp |
@@ -13,6 +13,7 @@ |
#include "GrIndexBuffer.h" |
#include "GrTextStrike.h" |
#include "GrTextStrike_impl.h" |
+#include "SkDraw.h" |
#include "SkGpuDevice.h" |
#include "SkPath.h" |
#include "SkRTConf.h" |
@@ -26,6 +27,12 @@ static const int kBaseDFFontSize = 32; |
SK_CONF_DECLARE(bool, c_DumpFontCache, "gpu.dumpFontCache", false, |
"Dump the contents of the font cache before every purge."); |
+bool GrDistanceFieldTextContext::CanDraw(const SkPaint& paint, const SkMatrix& ctm) { |
+ return !paint.getRasterizer() && !paint.getMaskFilter() |
+ && paint.getStyle() == SkPaint::kFill_Style |
bsalomon
2014/01/29 19:38:54
style nit: &&s on prev line.
|
+ && !SkDraw::ShouldDrawTextAsPaths(paint, ctm); |
+} |
+ |
GrDistanceFieldTextContext::GrDistanceFieldTextContext(GrContext* context, |
const GrPaint& grPaint, |
const SkPaint& skPaint, |