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

Unified Diff: include/core/SkCanvas.h

Issue 1491293002: detect when we can filter bitmaps/images directly, w/o a tmp layer (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 | « no previous file | include/core/SkDevice.h » ('j') | include/core/SkDevice.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 53f6dda88b090c5734a7e7104925ae0749bb76d9..7ffe6699e5e7b4397b7ff7a919d2b0bc666d65d1 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1428,6 +1428,13 @@ private:
*/
bool wouldOverwriteEntireSurface(const SkRect*, const SkPaint*, ShaderOverrideOpacity) const;
+ /**
+ * Returns true if the paint's imagefilter can be invoked directly, without needed a temp
+ * layer. This method calls through to the corresponding method on Device, but it also
+ * checks the clip, as currently the filter can only be invoked directly if the result will
+ * be clipped to the bounds of the bitmap (or smaller).
+ */
+ bool canCallFilterSprite(const SkRect& bounds, const SkPaint&);
/* These maintain a cache of the clip bounds in local coordinates,
(converted to 2s-compliment if floats are slow).
« no previous file with comments | « no previous file | include/core/SkDevice.h » ('j') | include/core/SkDevice.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698