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

Unified Diff: gm/xfermodes3.cpp

Issue 25275004: store SkAlphaType inside SkBitmap, on road to support unpremul (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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: gm/xfermodes3.cpp
diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp
index baac3cdaff6d44e36bfd465388c928c1eab48f3c..d01c0190d4a4391f6f99a1a8052b493a47acdc57 100644
--- a/gm/xfermodes3.cpp
+++ b/gm/xfermodes3.cpp
@@ -188,11 +188,10 @@ private:
SkPackARGB32(0xFF, 0x40, 0x40, 0x40)
};
SkBitmap bg;
- bg.setConfig(SkBitmap::kARGB_8888_Config, 2, 2);
+ bg.setConfig(SkBitmap::kARGB_8888_Config, 2, 2, 0, kOpaque_SkAlphaType);
bg.allocPixels();
SkAutoLockPixels bgAlp(bg);
memcpy(bg.getPixels(), kCheckData, sizeof(kCheckData));
- bg.setIsOpaque(true);
fBGShader.reset(SkShader::CreateBitmapShader(bg,
SkShader::kRepeat_TileMode,
« no previous file with comments | « gm/xfermodes2.cpp ('k') | include/core/SkBitmap.h » ('j') | src/core/SkBitmap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698