Index: tests/CanvasTest.cpp |
=================================================================== |
--- tests/CanvasTest.cpp (revision 9282) |
+++ tests/CanvasTest.cpp (working copy) |
@@ -777,24 +777,29 @@ |
SkBitmap deferredStore; |
createBitmap(&deferredStore, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); |
SkDevice deferredDevice(deferredStore); |
- SkDeferredCanvas deferredCanvas(&deferredDevice); |
+ SkAutoTUnref<SkDeferredCanvas> deferredCanvas( |
+#if SK_DEFERRED_CANVAS_USES_FACTORIES |
+ SkDeferredCanvas::Create(&deferredDevice)); |
+#else |
+ SkNEW_ARGS(SkDeferredCanvas, (&deferredDevice))); |
+#endif |
testStep->setAssertMessageFormat(kDeferredDrawAssertMessageFormat); |
- testStep->draw(&deferredCanvas, reporter); |
+ testStep->draw(deferredCanvas, reporter); |
testStep->setAssertMessageFormat(kDeferredPreFlushAssertMessageFormat); |
- AssertCanvasStatesEqual(reporter, &deferredCanvas, &referenceCanvas, |
+ AssertCanvasStatesEqual(reporter, deferredCanvas, &referenceCanvas, |
testStep); |
if (silent) { |
- deferredCanvas.silentFlush(); |
+ deferredCanvas->silentFlush(); |
} else { |
- deferredCanvas.flush(); |
+ deferredCanvas->flush(); |
} |
testStep->setAssertMessageFormat( |
silent ? kDeferredPostSilentFlushPlaybackAssertMessageFormat : |
kDeferredPostFlushPlaybackAssertMessageFormat); |
AssertCanvasStatesEqual(reporter, |
- deferredCanvas.immediateCanvas(), |
+ deferredCanvas->immediateCanvas(), |
&referenceCanvas, testStep); |
// Verified that deferred canvas state is not affected by flushing |