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

Unified Diff: gm/colormatrix.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/clippedbitmapshaders.cpp ('k') | gm/deviceproperties.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/colormatrix.cpp
diff --git a/gm/colormatrix.cpp b/gm/colormatrix.cpp
index 2f98693da22452858f613a1877567d6a17211bab..e0dcfaf72ef74d20d7e6b23628f97211bf66371c 100644
--- a/gm/colormatrix.cpp
+++ b/gm/colormatrix.cpp
@@ -63,8 +63,7 @@ protected:
SkBitmap createSolidBitmap(int width, int height) {
SkBitmap bm;
- bm.setConfig(SkBitmap::kARGB_8888_Config, width, height);
- bm.allocPixels();
+ bm.allocN32Pixels(width, height);
SkCanvas canvas(bm);
canvas.clear(0x0);
for (int y = 0; y < height; ++y) {
@@ -81,8 +80,7 @@ protected:
// creates a bitmap with shades of transparent gray.
SkBitmap createTransparentBitmap(int width, int height) {
SkBitmap bm;
- bm.setConfig(SkBitmap::kARGB_8888_Config, width, height);
- bm.allocPixels();
+ bm.allocN32Pixels(width, height);
SkCanvas canvas(bm);
canvas.clear(0x0);
« no previous file with comments | « gm/clippedbitmapshaders.cpp ('k') | gm/deviceproperties.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698