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

Unified Diff: include/core/SkImageFilter.h

Issue 1500923004: Matrix convolution bounds fix; affectsTransparentBlack fixes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Alternate, more future-proof fix 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 | « gm/matrixconvolution.cpp ('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/SkImageFilter.h
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index d90df29c8bfeaabfba887417c17b6e7f8447e83b..909a2f82840e93c2c6842a3407ef3b67ec3eb893 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -199,12 +199,7 @@ public:
* replaced by the returned colorfilter. i.e. the two effects will affect drawing in the
* same way.
*/
- bool asAColorFilter(SkColorFilter** filterPtr) const {
- return this->countInputs() > 0 &&
- NULL == this->getInput(0) &&
- !this->affectsTransparentBlack() &&
- this->isColorFilterNode(filterPtr);
- }
+ bool asAColorFilter(SkColorFilter** filterPtr) const;
/**
* Returns the number of inputs this filter will accept (some inputs can
@@ -240,7 +235,7 @@ public:
virtual void computeFastBounds(const SkRect&, SkRect*) const;
// Can this filter DAG compute the resulting bounds of an object-space rectangle?
- bool canComputeFastBounds() const;
+ virtual bool canComputeFastBounds() const;
/**
* If this filter can be represented by another filter + a localMatrix, return that filter,
@@ -410,14 +405,6 @@ protected:
virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&,
const SkIRect& bounds) const;
- /**
- * Returns true if this filter can cause transparent black pixels to become
- * visible (ie., alpha > 0). The default implementation returns false. This
- * function is non-recursive, i.e., only queries this filter and not its
- * inputs.
- */
- virtual bool affectsTransparentBlack() const;
-
private:
friend class SkGraphics;
static void PurgeCache();
« no previous file with comments | « gm/matrixconvolution.cpp ('k') | include/effects/SkColorFilterImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698