Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index a7bf82e6f07d4bf37fe0107d35228b4d41a30a6f..04bc14e5631fb3f3c2740ed4e991ec0eeb721d1f 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -68,6 +68,11 @@ |
/////////////////////////////////////////////////////////////////////////////// |
+#define CHECK_FOR_ANNOTATION(paint) \ |
+ do { if (paint.getAnnotation()) { return; } } while (0) |
+ |
+/////////////////////////////////////////////////////////////////////////////// |
+ |
// Helper for turning a bitmap into a texture. If the bitmap is GrTexture backed this |
// just accesses the backing GrTexture. Otherwise, it creates a cached texture |
// representation and releases it in the destructor. |
@@ -396,6 +401,7 @@ |
size_t count, const SkPoint pts[], const SkPaint& paint) { |
ASSERT_SINGLE_OWNER |
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPoints", fContext); |
+ CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
SkScalar width = paint.getStrokeWidth(); |
@@ -447,6 +453,7 @@ |
void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, const SkPaint& paint) { |
ASSERT_SINGLE_OWNER |
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawRect", fContext); |
+ CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
bool doStroke = paint.getStyle() != SkPaint::kFill_Style; |
@@ -493,6 +500,7 @@ |
const SkPaint& paint) { |
ASSERT_SINGLE_OWNER |
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawRRect", fContext); |
+ CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
GrPaint grPaint; |
@@ -557,6 +565,7 @@ |
const SkRRect& inner, const SkPaint& paint) { |
ASSERT_SINGLE_OWNER |
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawDRRect", fContext); |
+ CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
if (outer.isEmpty()) { |
@@ -597,6 +606,7 @@ |
void SkGpuDevice::drawOval(const SkDraw& draw, const SkRect& oval, const SkPaint& paint) { |
ASSERT_SINGLE_OWNER |
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawOval", fContext); |
+ CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
// Presumably the path effect warps this to something other than an oval |
@@ -651,6 +661,7 @@ |
} |
} |
+ CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPath", fContext); |
@@ -1461,6 +1472,7 @@ |
const SkIRect& center, const SkRect& dst, const SkPaint& paint) { |
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawProducerNine", fContext); |
+ CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
bool useFallback = paint.getMaskFilter() || paint.isAntiAlias() || |