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

Unified Diff: bench/ImageCacheBench.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/GameBench.cpp ('k') | bench/MagnifierBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ImageCacheBench.cpp
diff --git a/bench/ImageCacheBench.cpp b/bench/ImageCacheBench.cpp
index 9fc538ebefe3a3c4bbd5c2ef765d6479ce4c9fd1..ef29cf88ff58571495db6619523d3a10c76880f6 100644
--- a/bench/ImageCacheBench.cpp
+++ b/bench/ImageCacheBench.cpp
@@ -18,16 +18,14 @@ class ImageCacheBench : public SkBenchmark {
};
public:
ImageCacheBench() : fCache(CACHE_COUNT * 100) {
- fBM.setConfig(SkBitmap::kARGB_8888_Config, DIM, DIM);
- fBM.allocPixels();
+ fBM.allocN32Pixels(DIM, DIM);
}
void populateCache() {
SkScalar scale = 1;
for (int i = 0; i < CACHE_COUNT; ++i) {
SkBitmap tmp;
- tmp.setConfig(SkBitmap::kARGB_8888_Config, 1, 1);
- tmp.allocPixels();
+ tmp.allocN32Pixels(1, 1);
fCache.unlock(fCache.addAndLock(fBM, scale, scale, tmp));
scale += 1;
}
« no previous file with comments | « bench/GameBench.cpp ('k') | bench/MagnifierBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698