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

Unified Diff: gm/optimizations.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/offsetimagefilter.cpp ('k') | gm/pathopsinverse.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/optimizations.cpp
diff --git a/gm/optimizations.cpp b/gm/optimizations.cpp
index 8d0b7caa84b500423cc8354cfc13494136787b31..a404ad7c55c9f023f28d8b94546aa228075b8579 100644
--- a/gm/optimizations.cpp
+++ b/gm/optimizations.cpp
@@ -395,10 +395,7 @@ private:
static const unsigned int kCheckerboardWidth = 16;
static const unsigned int kCheckerboardHeight = 16;
- fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config,
- kCheckerboardWidth, kCheckerboardHeight);
- fCheckerboard.allocPixels();
- SkAutoLockPixels lock(fCheckerboard);
+ fCheckerboard.allocN32Pixels(kCheckerboardWidth, kCheckerboardHeight);
for (unsigned int y = 0; y < kCheckerboardHeight; y += 2) {
SkPMColor* scanline = fCheckerboard.getAddr32(0, y);
for (unsigned int x = 0; x < kCheckerboardWidth; x += 2) {
« no previous file with comments | « gm/offsetimagefilter.cpp ('k') | gm/pathopsinverse.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698