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

Unified Diff: gm/samplerstress.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/pathopsinverse.cpp ('k') | gm/scalebitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/samplerstress.cpp
diff --git a/gm/samplerstress.cpp b/gm/samplerstress.cpp
index 93a26dd49c9691e9546a0ad1b69a37dd83aa7cd3..2ddac3a1ae2e2e2424c777f06859e0e0dae2d3a9 100644
--- a/gm/samplerstress.cpp
+++ b/gm/samplerstress.cpp
@@ -47,13 +47,7 @@ protected:
static const int xSize = 16;
static const int ySize = 16;
- fTexture.setConfig(SkBitmap::kARGB_8888_Config,
- xSize,
- ySize,
- xSize*sizeof(SkColor));
-
- fTexture.allocPixels();
- fTexture.lockPixels();
+ fTexture.allocN32Pixels(xSize, ySize);
SkPMColor* addr = fTexture.getAddr32(0, 0);
for (int y = 0; y < ySize; ++y) {
@@ -69,8 +63,6 @@ protected:
}
}
- fTexture.unlockPixels();
-
fTextureCreated = true;
}
« no previous file with comments | « gm/pathopsinverse.cpp ('k') | gm/scalebitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698