diff options
author | reed <reed@google.com> | 2015-05-05 12:54:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-05 12:54:33 -0700 |
commit | 14fe8fd3e53b5e988aac189a8bc3ed28904d85c8 (patch) | |
tree | 1f7f2259964a150606e18a4b27c131f76a53a244 /src/core/SkPaintPriv.cpp | |
parent | beedb81a7fa9bd1274d64b2c000ef6ee23c9a810 (diff) |
Make drawImage a virtual on SkDevice
Now with patch for SkDeferredCanvas
This reverts commit 119468b71f8f4f45657ab30ead331be665de5a57.
BUG=skia:
Review URL: https://codereview.chromium.org/1122643005
Diffstat (limited to 'src/core/SkPaintPriv.cpp')
-rw-r--r-- | src/core/SkPaintPriv.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/SkPaintPriv.cpp b/src/core/SkPaintPriv.cpp index c6957cd1ca..3ced573929 100644 --- a/src/core/SkPaintPriv.cpp +++ b/src/core/SkPaintPriv.cpp @@ -9,6 +9,7 @@ #include "SkBitmap.h" #include "SkColorFilter.h" +#include "SkImage.h" #include "SkPaint.h" #include "SkShader.h" @@ -49,3 +50,8 @@ bool isPaintOpaque(const SkPaint* paint, const SkBitmap* bmpReplacesShader) { return isPaintOpaque(paint, contentType); } + +bool isPaintOpaque(const SkPaint* paint, const SkImage* image) { + return isPaintOpaque(paint, image->isOpaque() ? + kOpaque_SkPaintBitmapOpacity : kUnknown_SkPaintBitmapOpacity); +} |