aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/DisplacementBench.cpp
diff options
context:
space:
mode:
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);