hide SkBitmap::setConfig
patch from issue 325733002
TBR=scroggo
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/322963002
diff --git a/bench/DisplacementBench.cpp b/bench/DisplacementBench.cpp
index 08da9b1..904f47d 100644
--- a/bench/DisplacementBench.cpp
+++ b/bench/DisplacementBench.cpp
@@ -33,10 +33,8 @@
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 @@
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);