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

Unified Diff: bench/MergeBench.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/MagnifierBench.cpp ('k') | bench/PictureRecordBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/MergeBench.cpp
diff --git a/bench/MergeBench.cpp b/bench/MergeBench.cpp
index cec0ea93e4b2df81caf5601ec4710c71751bb0a5..9f16449a8248ac3b5122ef074fac423fdcb5578f 100644
--- a/bench/MergeBench.cpp
+++ b/bench/MergeBench.cpp
@@ -52,10 +52,8 @@ private:
}
void make_bitmap() {
- fBitmap.setConfig(SkBitmap::kARGB_8888_Config, 80, 80);
- fBitmap.allocPixels();
- SkBitmapDevice device(fBitmap);
- SkCanvas canvas(&device);
+ fBitmap.allocN32Pixels(80, 80);
+ SkCanvas canvas(fBitmap);
canvas.clear(0x00000000);
SkPaint paint;
paint.setAntiAlias(true);
@@ -66,10 +64,8 @@ private:
}
void make_checkerboard() {
- fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config, 80, 80);
- fCheckerboard.allocPixels();
- SkBitmapDevice device(fCheckerboard);
- SkCanvas canvas(&device);
+ fCheckerboard.allocN32Pixels(80, 80);
+ SkCanvas canvas(fCheckerboard);
canvas.clear(0x00000000);
SkPaint darkPaint;
darkPaint.setColor(0xFF804020);
« no previous file with comments | « bench/MagnifierBench.cpp ('k') | bench/PictureRecordBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698