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

Unified Diff: gm/mixedxfermodes.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/matrixconvolution.cpp ('k') | gm/modecolorfilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/mixedxfermodes.cpp
diff --git a/gm/mixedxfermodes.cpp b/gm/mixedxfermodes.cpp
index e3ce91a9dcb0b210a006651449b0f15a8bfca3fc..45623255571e26984ebb286a9124833cbc3b1f38 100644
--- a/gm/mixedxfermodes.cpp
+++ b/gm/mixedxfermodes.cpp
@@ -84,11 +84,8 @@ protected:
0xFFCCCCCC,
0xFFFFFFFF };
SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, 2, 2, 2 * sizeof(uint32_t));
- bitmap.allocPixels();
- bitmap.lockPixels();
+ bitmap.allocN32Pixels(2, 2);
memcpy(bitmap.getPixels(), kCheckerPixelData, sizeof(kCheckerPixelData));
- bitmap.unlockPixels();
fBG.reset(SkShader::CreateBitmapShader(bitmap,
SkShader::kRepeat_TileMode,
SkShader::kRepeat_TileMode));
« no previous file with comments | « gm/matrixconvolution.cpp ('k') | gm/modecolorfilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698