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

Unified Diff: bench/GameBench.cpp

Issue 322963002: hide SkBitmap::setConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « bench/DisplacementBench.cpp ('k') | bench/ImageCacheBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GameBench.cpp
diff --git a/bench/GameBench.cpp b/bench/GameBench.cpp
index c0a0e1b1b3e21fdab41c8188766442b8adc9b1f3..d197f3e1704c4e8f0cd7ba1ab124f6c08f57fff6 100644
--- a/bench/GameBench.cpp
+++ b/bench/GameBench.cpp
@@ -248,9 +248,7 @@ private:
void makeCheckerboard() {
static int kCheckSize = 16;
- fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config,
- kCheckerboardWidth, kCheckerboardHeight);
- fCheckerboard.allocPixels();
+ fCheckerboard.allocN32Pixels(kCheckerboardWidth, kCheckerboardHeight);
SkAutoLockPixels lock(fCheckerboard);
for (int y = 0; y < kCheckerboardHeight; ++y) {
int even = (y / kCheckSize) % 2;
@@ -283,8 +281,7 @@ private:
}
}
- fAtlas.setConfig(SkBitmap::kARGB_8888_Config, kTotAtlasWidth, kTotAtlasHeight);
- fAtlas.allocPixels();
+ fAtlas.allocN32Pixels(kTotAtlasWidth, kTotAtlasHeight);
SkAutoLockPixels lock(fAtlas);
for (int y = 0; y < kTotAtlasHeight; ++y) {
« no previous file with comments | « bench/DisplacementBench.cpp ('k') | bench/ImageCacheBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698