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

Unified Diff: gm/xfermodes2.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
« no previous file with comments | « gm/xfermodes.cpp ('k') | gm/xfermodes3.cpp » ('j') | src/core/SkBitmap.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodes2.cpp
diff --git a/gm/xfermodes2.cpp b/gm/xfermodes2.cpp
index 990ee508d50db931dcd6ea9fc661500c98020ff6..046c3ddc2af47dc8d9ad25e3e94f66fc3de1a65e 100644
--- a/gm/xfermodes2.cpp
+++ b/gm/xfermodes2.cpp
@@ -93,11 +93,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);
fBG.reset(SkShader::CreateBitmapShader(bg,
SkShader::kRepeat_TileMode,
« no previous file with comments | « gm/xfermodes.cpp ('k') | gm/xfermodes3.cpp » ('j') | src/core/SkBitmap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698