Index: include/core/SkPaint.h |
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h |
index 1b993fc5ea8a92b947d3d48355b329917265b22b..b16379204791a0eedb681cb6ae7507f95dc47ad3 100644 |
--- a/include/core/SkPaint.h |
+++ b/include/core/SkPaint.h |
@@ -9,6 +9,7 @@ |
#define SkPaint_DEFINED |
#include "SkColor.h" |
+#include "SkDrawLooper.h" |
#include "SkFilterQuality.h" |
#include "SkMatrix.h" |
#include "SkXfermode.h" |
@@ -19,7 +20,6 @@ |
class SkColorFilter; |
class SkData; |
class SkDescriptor; |
-class SkDrawLooper; |
class SkReadBuffer; |
class SkWriteBuffer; |
class SkGlyph; |
@@ -909,7 +909,12 @@ |
bounds (i.e. there is nothing complex like a patheffect that would make |
the bounds computation expensive. |
*/ |
- bool canComputeFastBounds() const; |
+ bool canComputeFastBounds() const { |
+ if (this->getLooper()) { |
+ return this->getLooper()->canComputeFastBounds(*this); |
+ } |
+ return !this->getRasterizer(); |
+ } |
/** Only call this if canComputeFastBounds() returned true. This takes a |
raw rectangle (the raw bounds of a shape), and adjusts it for stylistic |