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

Unified Diff: src/image/SkImage_Gpu.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 | « src/image/SkImage_Codec.cpp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 0918412e83c1decbb2bad6e9d26dc8501d73ce55..d98a5367a699cb33bf9b09e05fd2a5b7f04395b7 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -31,6 +31,9 @@ public:
virtual SkShader* onNewShader(SkShader::TileMode,
SkShader::TileMode,
const SkMatrix* localMatrix) const SK_OVERRIDE;
+
+ virtual bool isOpaque() const SK_OVERRIDE;
+
private:
SkBitmap fBitmap;
@@ -72,6 +75,10 @@ bool SkImage_Gpu::getROPixels(SkBitmap* dst) const {
return fBitmap.copyTo(dst, kN32_SkColorType);
}
+bool SkImage_Gpu::isOpaque() const {
+ return fBitmap.isOpaque();
+}
+
///////////////////////////////////////////////////////////////////////////////
SkImage* SkImage::NewTexture(const SkBitmap& bitmap) {
« no previous file with comments | « src/image/SkImage_Codec.cpp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698