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

Unified Diff: gm/image.cpp

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 | « no previous file | include/core/SkImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/image.cpp
diff --git a/gm/image.cpp b/gm/image.cpp
index a67ed202dbea196f157d3d55e6877cc6f1de2c9c..400d421a40a33a63d53939fb83818be87acd5b8c 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -303,8 +303,7 @@ DEF_GM( return new ScalePixelsGM; )
#include "SkImageGenerator.h"
static SkImageInfo make_info(SkImage* img) {
- return SkImageInfo::MakeN32(img->width(), img->height(),
- img->isOpaque() ? kOpaque_SkAlphaType : kPremul_SkAlphaType);
+ return SkImageInfo::MakeN32(img->width(), img->height(), img->alphaType());
}
// Its simple, but I wonder if we should expose this formally?
« no previous file with comments | « no previous file | include/core/SkImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698