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

Unified Diff: gm/bleed.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 | « bench/TileBench.cpp ('k') | gm/xfermodes.cpp » ('j') | src/core/SkBitmap.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bleed.cpp
diff --git a/gm/bleed.cpp b/gm/bleed.cpp
index dc7e96fbb122716c76d397de1cf5d59eda399354..0d093940decc73da421833cb8336b96bf267b98e 100644
--- a/gm/bleed.cpp
+++ b/gm/bleed.cpp
@@ -19,7 +19,8 @@
static void make_red_ringed_bitmap(SkBitmap* result, int width, int height) {
SkASSERT(0 == width % 2 && 0 == width % 2);
- result->setConfig(SkBitmap::kARGB_8888_Config, width, height);
+ result->setConfig(SkBitmap::kARGB_8888_Config, width, height, 0,
+ kOpaque_SkAlphaType);
result->allocPixels();
SkAutoLockPixels lock(*result);
@@ -56,7 +57,6 @@ static void make_red_ringed_bitmap(SkBitmap* result, int width, int height) {
for (int x = 0; x < width; ++x) {
scanline[x] = SK_ColorRED;
}
- result->setIsOpaque(true);
result->setImmutable();
}
« no previous file with comments | « bench/TileBench.cpp ('k') | gm/xfermodes.cpp » ('j') | src/core/SkBitmap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698