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

Unified Diff: include/core/SkPaint.h

Issue 1296943002: Implement canComputeFastBounds() for image filters. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Put SkColorFilter::affectsTransparentBlack() back as a non-virtual helper. Created 5 years, 4 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/core/SkImageFilter.h ('k') | include/effects/SkColorFilterImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPaint.h
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index b16379204791a0eedb681cb6ae7507f95dc47ad3..1b993fc5ea8a92b947d3d48355b329917265b22b 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -9,7 +9,6 @@
#define SkPaint_DEFINED
#include "SkColor.h"
-#include "SkDrawLooper.h"
#include "SkFilterQuality.h"
#include "SkMatrix.h"
#include "SkXfermode.h"
@@ -20,6 +19,7 @@ class SkAutoGlyphCache;
class SkColorFilter;
class SkData;
class SkDescriptor;
+class SkDrawLooper;
class SkReadBuffer;
class SkWriteBuffer;
class SkGlyph;
@@ -909,12 +909,7 @@ public:
bounds (i.e. there is nothing complex like a patheffect that would make
the bounds computation expensive.
*/
- bool canComputeFastBounds() const {
- if (this->getLooper()) {
- return this->getLooper()->canComputeFastBounds(*this);
- }
- return !this->getRasterizer();
- }
+ bool canComputeFastBounds() const;
/** Only call this if canComputeFastBounds() returned true. This takes a
raw rectangle (the raw bounds of a shape), and adjusts it for stylistic
« no previous file with comments | « include/core/SkImageFilter.h ('k') | include/effects/SkColorFilterImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698