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

Unified Diff: bench/RepeatTileBench.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: bench/RepeatTileBench.cpp
diff --git a/bench/RepeatTileBench.cpp b/bench/RepeatTileBench.cpp
index 612a149d6df78325470fb3ceef6d8b4e7b992bb6..957ec2a83e28dd02c06d9ec65a94edcedf4d7eaf 100644
--- a/bench/RepeatTileBench.cpp
+++ b/bench/RepeatTileBench.cpp
@@ -115,7 +115,8 @@ protected:
virtual void onPreDraw() SK_OVERRIDE {
fBitmap.allocPixels();
fBitmap.eraseColor(fIsOpaque ? SK_ColorWHITE : 0);
- fBitmap.setIsOpaque(fIsOpaque);
+ fBitmap.setAlphaType(fIsOpaque ?
+ kOpaque_SkAlphaType : kPremul_SkAlphaType);
draw_into_bitmap(fBitmap);
« no previous file with comments | « bench/BitmapScaleBench.cpp ('k') | bench/TileBench.cpp » ('j') | src/core/SkBitmap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698