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

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: Created 6 years, 5 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/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 7a73c7453bc918ccf0ceb7f4e41ae02ea643e879..9b9f4b1f75338a0f90d77b87aba3de81474bfaae 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -28,6 +28,8 @@ public:
GrTexture* getTexture() { return fBitmap.getTexture(); }
virtual SkShader* onNewShader(SkShader::TileMode, SkShader::TileMode) const SK_OVERRIDE;
+
+ virtual bool isOpaque() const SK_OVERRIDE;
private:
SkBitmap fBitmap;
@@ -80,3 +82,7 @@ SkImage* SkImage::NewTexture(const SkBitmap& bitmap) {
GrTexture* SkTextureImageGetTexture(SkImage* image) {
return ((SkImage_Gpu*)image)->getTexture();
}
+
+bool SkImage_Gpu::isOpaque() const {
+ return fBitmap.isOpaque();
+}

Powered by Google App Engine
This is Rietveld 408576698