remove SkCanvas::createCompatibleDevice, and add SkCanvas::newSurface
BUG=skia:
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/154163002
git-svn-id: http://skia.googlecode.com/svn/trunk@13319 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index 81f19b1..a40c667 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -825,14 +825,14 @@
NotificationCounter notificationCounter;
canvas->setNotificationClient(¬ificationCounter);
- SkAutoTUnref<SkBaseDevice> secondaryDevice(canvas->createCompatibleDevice(
- SkBitmap::kARGB_8888_Config, 10, 10, false));
- SkCanvas secondaryCanvas(secondaryDevice.get());
+ SkImageInfo info = SkImageInfo::MakeN32Premul(10, 10);
+ SkAutoTUnref<SkSurface> secondarySurface(canvas->newSurface(info));
+
SkRect rect = SkRect::MakeWH(5, 5);
SkPaint paint;
// After spawning a compatible canvas:
// 1) Verify that secondary canvas is usable and does not report to the notification client.
- secondaryCanvas.drawRect(rect, paint);
+ surface->getCanvas()->drawRect(rect, paint);
REPORTER_ASSERT(reporter, notificationCounter.fStorageAllocatedChangedCount == 0);
// 2) Verify that original canvas is usable and still reports to the notification client.
canvas->drawRect(rect, paint);