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

Unified Diff: include/core/SkImage.h

Issue 2250663002: Add alphaType() to SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@special-image-alpha-type
Patch Set: Remove virtuals from SkImage, slight cleanup Created 4 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 | « gm/image.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImage.h
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index fd20e5e0e521f712848be9bdd5d6d2c481d2cd99..bdcb5b0abeec6ef68fa9780f27b002573f7eb96f 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -166,7 +166,8 @@ public:
SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); }
SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); }
uint32_t uniqueID() const { return fUniqueID; }
- virtual bool isOpaque() const { return false; }
+ SkAlphaType alphaType() const;
+ bool isOpaque() const { return SkAlphaTypeIsOpaque(this->alphaType()); }
/**
* Extracts YUV planes from the SkImage and stores them in client-provided memory. The sizes
« no previous file with comments | « gm/image.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698