Index: tests/DeferredCanvasTest.cpp |
=================================================================== |
--- tests/DeferredCanvasTest.cpp (revision 10994) |
+++ tests/DeferredCanvasTest.cpp (working copy) |
@@ -7,9 +7,9 @@ |
*/ |
#include "Test.h" |
#include "SkBitmap.h" |
+#include "SkBitmapDevice.h" |
#include "SkBitmapProcShader.h" |
#include "SkDeferredCanvas.h" |
-#include "SkDevice.h" |
#include "SkGradientShader.h" |
#include "SkShader.h" |
#include "../src/image/SkSurface_Base.h" |
@@ -33,7 +33,7 @@ |
SkBitmap store; |
create(&store, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
canvas->clear(0x00000000); |
@@ -259,7 +259,7 @@ |
SkBitmap store; |
create(&store, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
canvas->clear(0x00000000); |
@@ -279,7 +279,7 @@ |
partialRect.setXYWH(SkIntToScalar(0), SkIntToScalar(0), |
SkIntToScalar(1), SkIntToScalar(1)); |
create(&store, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
// verify that frame is intially fresh |
@@ -433,9 +433,9 @@ |
} |
} |
-class MockDevice : public SkDevice { |
+class MockDevice : public SkBitmapDevice { |
public: |
- MockDevice(const SkBitmap& bm) : SkDevice(bm) { |
+ MockDevice(const SkBitmap& bm) : SkBitmapDevice(bm) { |
fDrawBitmapCallCount = 0; |
} |
virtual void drawBitmap(const SkDraw&, const SkBitmap&, |
@@ -502,7 +502,7 @@ |
SkBitmap store; |
store.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); |
store.allocPixels(); |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
NotificationCounter notificationCounter; |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
canvas->setNotificationClient(¬ificationCounter); |
@@ -585,7 +585,7 @@ |
SkBitmap store; |
store.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); |
store.allocPixels(); |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
NotificationCounter notificationCounter; |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
canvas->setNotificationClient(¬ificationCounter); |
@@ -606,7 +606,7 @@ |
SkBitmap store; |
store.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); |
store.allocPixels(); |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
// test will fail if nbIterations is not in sync with |
// BITMAPS_TO_KEEP in SkGPipeWrite.cpp |
@@ -652,7 +652,7 @@ |
// 1 under : should not store the image |
{ |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
canvas->setBitmapSizeThreshold(39999); |
canvas->drawBitmap(sourceImage, 0, 0, NULL); |
@@ -662,7 +662,7 @@ |
// exact value : should store the image |
{ |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
canvas->setBitmapSizeThreshold(40000); |
canvas->drawBitmap(sourceImage, 0, 0, NULL); |
@@ -672,7 +672,7 @@ |
// 1 over : should still store the image |
{ |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
canvas->setBitmapSizeThreshold(40001); |
canvas->drawBitmap(sourceImage, 0, 0, NULL); |
@@ -807,11 +807,11 @@ |
SkBitmap store; |
store.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); |
store.allocPixels(); |
- SkDevice device(store); |
+ SkBitmapDevice device(store); |
NotificationCounter notificationCounter; |
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); |
canvas->setNotificationClient(¬ificationCounter); |
- SkAutoTUnref<SkDevice> secondaryDevice(canvas->createCompatibleDevice( |
+ SkAutoTUnref<SkBaseDevice> secondaryDevice(canvas->createCompatibleDevice( |
SkBitmap::kARGB_8888_Config, 10, 10, device.isOpaque())); |
SkCanvas secondaryCanvas(secondaryDevice.get()); |
SkRect rect = SkRect::MakeWH(5, 5); |