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

Unified Diff: gm/drawbitmaprect.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/blurrect.cpp ('k') | gm/gmmain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/drawbitmaprect.cpp
diff --git a/gm/drawbitmaprect.cpp b/gm/drawbitmaprect.cpp
index 31cba51e798ac443ea681d410b2c1d2eed39f7d5..664958a06b7258b890026f51ebed52728696133b 100644
--- a/gm/drawbitmaprect.cpp
+++ b/gm/drawbitmaprect.cpp
@@ -28,8 +28,8 @@ static SkBitmap make_chessbm(int w, int h) {
return bm;
}
-static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) {
- bm->allocConfigPixels(config, w, h);
+static void makebm(SkBitmap* bm, int w, int h) {
+ bm->allocN32Pixels(w, h);
bm->eraseColor(SK_ColorTRANSPARENT);
SkCanvas canvas(*bm);
@@ -89,9 +89,7 @@ protected:
virtual void onDraw(SkCanvas* canvas) {
static const int kBmpSize = 2048;
if (fLargeBitmap.isNull()) {
- makebm(&fLargeBitmap,
- SkBitmap::kARGB_8888_Config,
- kBmpSize, kBmpSize);
+ makebm(&fLargeBitmap, kBmpSize, kBmpSize);
}
SkRect dstRect = { 0, 0, SkIntToScalar(64), SkIntToScalar(64)};
static const int kMaxSrcRectSize = 1 << (SkNextLog2(kBmpSize) + 2);
« no previous file with comments | « gm/blurrect.cpp ('k') | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698