From 6c22573edb234ad14df947278cfed010669a39a7 Mon Sep 17 00:00:00 2001 From: reed Date: Mon, 9 Jun 2014 19:52:07 -0700 Subject: hide SkBitmap::setConfig patch from issue 325733002 TBR=scroggo Author: reed@chromium.org Review URL: https://codereview.chromium.org/322963002 --- bench/DisplacementBench.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'bench/DisplacementBench.cpp') 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); -- cgit v1.2.3