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

Unified Diff: gm/srcmode.cpp

Issue 137993012: use some helper Make functions to initialize SkImageInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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') | include/core/SkImageInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/srcmode.cpp
diff --git a/gm/srcmode.cpp b/gm/srcmode.cpp
index 666a36bb040e2e300e61df59c03a3024dbbb1ddc..6aa236f3f4321c19fafb15d7d720f3234d46a6ed 100644
--- a/gm/srcmode.cpp
+++ b/gm/srcmode.cpp
@@ -117,12 +117,7 @@ protected:
static SkSurface* compat_surface(SkCanvas* canvas, const SkISize& size,
bool skipGPU) {
- SkImageInfo info = {
- size.width(),
- size.height(),
- kPMColor_SkColorType,
- kPremul_SkAlphaType
- };
+ SkImageInfo info = SkImageInfo::MakeN32Premul(size);
#if SK_SUPPORT_GPU
SkBaseDevice* dev = canvas->getDevice();
if (!skipGPU && dev->accessRenderTarget()) {
« no previous file with comments | « gm/image.cpp ('k') | include/core/SkImageInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698