Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1886)

Unified Diff: tests/CanvasStateTest.cpp

Issue 168653002: Change device factories to take SkImageInfo instead of SkBitmap::Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix PdfViewer Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/SkPictureUtils.cpp ('k') | tests/GpuBitmapCopyTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CanvasStateTest.cpp
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp
index 7c441a40feb4c761e3145e9dca7f3a2a39f61e9f..29e67f2e14f5544455a22047ee70312b84c6d127 100644
--- a/tests/CanvasStateTest.cpp
+++ b/tests/CanvasStateTest.cpp
@@ -186,8 +186,9 @@ public:
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 test_draw_filters(skiatest::Reporter* reporter) {
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));
« no previous file with comments | « src/utils/SkPictureUtils.cpp ('k') | tests/GpuBitmapCopyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698