Index: src/core/SkImageFilter.cpp |
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
index 3214eeb40eee8c3ecf4d61113b726f1f1722a58f..5f9fa64110dbb171932759cce6c36ea3ffb2730c 100644 |
--- a/src/core/SkImageFilter.cpp |
+++ b/src/core/SkImageFilter.cpp |
@@ -284,6 +284,23 @@ void SkImageFilter::computeFastBounds(const SkRect& src, SkRect* dst) const { |
} |
} |
+bool SkImageFilter::canComputeFastBounds() const { |
+ if (this->affectsTransparentBlack()) { |
+ return false; |
+ } |
+ for (int i = 0; i < fInputCount; i++) { |
+ SkImageFilter* input = this->getInput(i); |
+ if (input && !input->canComputeFastBounds()) { |
+ return false; |
+ } |
+ } |
+ return true; |
+} |
+ |
+bool SkImageFilter::affectsTransparentBlack() const { |
+ return false; |
+} |
+ |
bool SkImageFilter::onFilterImage(Proxy*, const SkBitmap&, const Context&, |
SkBitmap*, SkIPoint*) const { |
return false; |