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

Unified Diff: src/core/SkImageFilter.cpp

Issue 1497083005: Revert of Matrix convolution bounds fix; affectsTransparentBlack fixes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/effects/SkRectShaderImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 3f33bc3876a3e9a4a4c9ea753743941be6aa292c..6a3286ed67475510be347379142f35d8084cc5df 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -309,6 +309,9 @@
}
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()) {
@@ -316,6 +319,10 @@
}
}
return true;
+}
+
+bool SkImageFilter::affectsTransparentBlack() const {
+ return false;
}
bool SkImageFilter::onFilterImage(Proxy*, const SkBitmap&, const Context&,
@@ -382,14 +389,6 @@
}
#endif
return false;
-}
-
-bool SkImageFilter::asAColorFilter(SkColorFilter** filterPtr) const {
- SkASSERT(nullptr != filterPtr);
- return this->countInputs() > 0 &&
- NULL == this->getInput(0) &&
- this->isColorFilterNode(filterPtr) &&
- !(*filterPtr)->affectsTransparentBlack();
}
bool SkImageFilter::applyCropRect(const Context& ctx, const SkBitmap& src,
« no previous file with comments | « include/effects/SkRectShaderImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698