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

Unified Diff: gm/xfermodes.cpp

Issue 169913003: replace SkBitmap::Config with SkColorType in gms (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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/tinybitmap.cpp ('k') | include/core/SkBitmap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodes.cpp
diff --git a/gm/xfermodes.cpp b/gm/xfermodes.cpp
index 353bebf56fe660465866a33943b0c663acbccb87..b5ce8b8ced8ad1ce2375d8b8a687c85bd1f17a3f 100644
--- a/gm/xfermodes.cpp
+++ b/gm/xfermodes.cpp
@@ -31,8 +31,7 @@ static void make_bitmaps(int w, int h, SkBitmap* src, SkBitmap* dst,
c.drawOval(r, p);
}
- dst->setConfig(SkBitmap::kARGB_8888_Config, w, h);
- dst->allocPixels();
+ dst->allocN32Pixels(w, h);
dst->eraseColor(SK_ColorTRANSPARENT);
{
@@ -42,8 +41,7 @@ static void make_bitmaps(int w, int h, SkBitmap* src, SkBitmap* dst,
c.drawRect(r, p);
}
- transparent->setConfig(SkBitmap::kARGB_8888_Config, w, h);
- transparent->allocPixels();
+ transparent->allocN32Pixels(w, h);
transparent->eraseColor(SK_ColorTRANSPARENT);
}
@@ -150,8 +148,9 @@ class XfermodesGM : public GM {
}
virtual void onOnceBeforeDraw() SK_OVERRIDE {
- fBG.setConfig(SkBitmap::kARGB_4444_Config, 2, 2, 4, kOpaque_SkAlphaType);
- fBG.setPixels(gData);
+ fBG.installPixels(SkImageInfo::Make(2, 2, kARGB_4444_SkColorType,
+ kOpaque_SkAlphaType),
+ gData, 4);
make_bitmaps(W, H, &fSrcB, &fDstB, &fTransparent);
}
« no previous file with comments | « gm/tinybitmap.cpp ('k') | include/core/SkBitmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698