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

Unified Diff: src/image/SkImage_Codec.cpp

Issue 406673003: Add the method isOpaque() to SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase master Created 6 years, 4 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
« no previous file with comments | « include/core/SkImage.h ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Codec.cpp
diff --git a/src/image/SkImage_Codec.cpp b/src/image/SkImage_Codec.cpp
index 21c844d01dd331b0f4235f215fc11ad494fb84bf..0b14216a064d9c6d81670f418b25692b58a9c8bf 100644
--- a/src/image/SkImage_Codec.cpp
+++ b/src/image/SkImage_Codec.cpp
@@ -22,6 +22,8 @@ public:
virtual void onDrawRectToRect(SkCanvas*, const SkRect*, const SkRect&,
const SkPaint*) const SK_OVERRIDE;
+ virtual bool isOpaque() const SK_OVERRIDE;
+
private:
SkData* fEncodedData;
SkBitmap fBitmap;
@@ -78,3 +80,8 @@ SkImage* SkImage::NewEncodedData(SkData* data) {
return SkNEW_ARGS(SkImage_Codec, (data, bitmap.width(), bitmap.height()));
}
+
+
+bool SkImage_Codec::isOpaque() const {
+ return fBitmap.isOpaque();
+}
« no previous file with comments | « include/core/SkImage.h ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698