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

Unified Diff: bench/BitmapScaleBench.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/BitmapRectBench.cpp ('k') | bench/BlurImageFilterBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/BitmapScaleBench.cpp
diff --git a/bench/BitmapScaleBench.cpp b/bench/BitmapScaleBench.cpp
index f6c2da17a98f58169558e594bd59409d148461a4..93e10fa43cc04723a15cc5569eaf68e000d136b7 100644
--- a/bench/BitmapScaleBench.cpp
+++ b/bench/BitmapScaleBench.cpp
@@ -57,14 +57,10 @@ protected:
}
virtual void onPreDraw() {
- fInputBitmap.setConfig(SkBitmap::kARGB_8888_Config,
- fInputSize, fInputSize, 0, kOpaque_SkAlphaType);
- fInputBitmap.allocPixels();
+ fInputBitmap.allocN32Pixels(fInputSize, fInputSize, true);
fInputBitmap.eraseColor(SK_ColorWHITE);
- fOutputBitmap.setConfig(SkBitmap::kARGB_8888_Config,
- fOutputSize, fOutputSize, 0, kOpaque_SkAlphaType);
- fOutputBitmap.allocPixels();
+ fOutputBitmap.allocN32Pixels(fOutputSize, fOutputSize, true);
fMatrix.setScale( scale(), scale() );
}
« no previous file with comments | « bench/BitmapRectBench.cpp ('k') | bench/BlurImageFilterBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698