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

Unified Diff: src/core/SkPaintPriv.h

Issue 920513003: Make filters use SkImage instead of SkBitmap Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
Index: src/core/SkPaintPriv.h
diff --git a/src/core/SkPaintPriv.h b/src/core/SkPaintPriv.h
index 88fc4fc3494ca1aed8d0eee6d71ea362bf2da50d..5c452f6e2387936fcedef86398f8732cf3f2c823 100644
--- a/src/core/SkPaintPriv.h
+++ b/src/core/SkPaintPriv.h
@@ -9,6 +9,7 @@
#define SkPaintPriv_DEFINED
class SkBitmap;
+class SkImage;
class SkPaint;
#include "SkTypes.h"
@@ -42,4 +43,16 @@ bool isPaintOpaque(const SkPaint* paint, SkPaintBitmapOpacity contentType);
*/
bool isPaintOpaque(const SkPaint* paint,
const SkBitmap* bmpReplacesShader = NULL);
+
+/** Returns true if draw calls that use the paint will completely occlude
+ canvas contents that are covered by the draw.
+ @param paint The paint to be analyzed, NULL is equivalent to
+ the default paint.
+ @param imageReplacesShader a image to be used in place of the paint's
+ shader.
+ @return true if paint is opaque
+*/
+bool isPaintOpaque(const SkPaint* paint,
+ const SkImage* imageReplacesShader);
+
#endif

Powered by Google App Engine
This is Rietveld 408576698