Change device factories to take SkImageInfo instead of SkBitmap::Config
patch from issue 167033002
BUG=skia:
R=reed@google.com
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/168653002
git-svn-id: http://skia.googlecode.com/svn/trunk@13463 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp
index 7c441a4..29e67f2 100644
--- a/tests/CanvasStateTest.cpp
+++ b/tests/CanvasStateTest.cpp
@@ -186,8 +186,9 @@
static void test_draw_filters(skiatest::Reporter* reporter) {
TestDrawFilter drawFilter;
- SkBitmapDevice device(SkBitmap::kARGB_8888_Config, 10, 10);
- SkCanvas canvas(&device);
+ SkBitmap bitmap;
+ bitmap.allocN32Pixels(10, 10);
+ SkCanvas canvas(bitmap);
canvas.setDrawFilter(&drawFilter);
@@ -209,8 +210,9 @@
static void error_callback(SkError code, void* ctx) {}
static void test_soft_clips(skiatest::Reporter* reporter) {
- SkBitmapDevice device(SkBitmap::kARGB_8888_Config, 10, 10);
- SkCanvas canvas(&device);
+ SkBitmap bitmap;
+ bitmap.allocN32Pixels(10, 10);
+ SkCanvas canvas(bitmap);
SkRRect roundRect;
roundRect.setOval(SkRect::MakeWH(5, 5));