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

Unified Diff: gm/bitmapscroll.cpp

Issue 140593005: add legacy/helper allocN32Pixels, and convert gm to use it (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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/bitmaprecttest.cpp ('k') | gm/bitmapshader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bitmapscroll.cpp
diff --git a/gm/bitmapscroll.cpp b/gm/bitmapscroll.cpp
index a1c0ce4702dcc760ba04b63a6fd641633900a58f..b14b0475dd6242a0ece52737afeb7a943be5a481 100644
--- a/gm/bitmapscroll.cpp
+++ b/gm/bitmapscroll.cpp
@@ -26,10 +26,7 @@ static void make_bitmap(int quarterWidth, int quarterHeight, SkBitmap *bitmap) {
pAlphaGray.setColor(0x66888888);
// Prepare bitmap, and a canvas that draws into it.
- bitmap->reset();
- bitmap->setConfig(SkBitmap::kARGB_8888_Config,
- quarterWidth*4, quarterHeight*4);
- bitmap->allocPixels();
+ bitmap->allocN32Pixels(quarterWidth*4, quarterHeight*4);
SkCanvas canvas(*bitmap);
SkScalar w = SkIntToScalar(quarterWidth);
« no previous file with comments | « gm/bitmaprecttest.cpp ('k') | gm/bitmapshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698