aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/DisplacementBench.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2014-06-09 19:52:07 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-09 19:52:07 -0700
commit6c22573edb234ad14df947278cfed010669a39a7 (patch)
treeede271bf82d823809c12d9b4ef3801dc7d6ddd73 /bench/DisplacementBench.cpp
parent7c5c9da436194c75d91797f114a87a6119ca255d (diff)
hide SkBitmap::setConfig
patch from issue 325733002 TBR=scroggo Author: reed@chromium.org Review URL: https://codereview.chromium.org/322963002
Diffstat (limited to 'bench/DisplacementBench.cpp')
-rw-r--r--bench/DisplacementBench.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/bench/DisplacementBench.cpp b/bench/DisplacementBench.cpp
index 08da9b19af..904f47d842 100644
--- a/bench/DisplacementBench.cpp
+++ b/bench/DisplacementBench.cpp
@@ -33,10 +33,8 @@ protected:
void makeBitmap() {
const int w = this->isSmall() ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE;
const int h = this->isSmall() ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE;
- fBitmap.setConfig(SkBitmap::kARGB_8888_Config, w, h);
- fBitmap.allocPixels();
- SkBitmapDevice device(fBitmap);
- SkCanvas canvas(&device);
+ fBitmap.allocN32Pixels(w, h);
+ SkCanvas canvas(fBitmap);
canvas.clear(0x00000000);
SkPaint paint;
paint.setAntiAlias(true);
@@ -49,10 +47,8 @@ protected:
void makeCheckerboard() {
const int w = this->isSmall() ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE;
const int h = this->isSmall() ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE;
- fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config, w, h);
- fCheckerboard.allocPixels();
- SkBitmapDevice device(fCheckerboard);
- SkCanvas canvas(&device);
+ fCheckerboard.allocN32Pixels(w, h);
+ SkCanvas canvas(fCheckerboard);
canvas.clear(0x00000000);
SkPaint darkPaint;
darkPaint.setColor(0xFF804020);