| Index: tests/CanvasTest.cpp
|
| diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
|
| index 3cefcbd4de8cdbc98e5ec09707a0c8a29ad58f61..ac7bf2a64fd070fb3b73d5d43c9ca0018bf78f6a 100644
|
| --- a/tests/CanvasTest.cpp
|
| +++ b/tests/CanvasTest.cpp
|
| @@ -117,6 +117,7 @@ public:
|
| , fText("Hello World")
|
| , fPoints2(kTestPoints2)
|
| , fBitmap(TestBitmap())
|
| + , fImage(createImage(fColor))
|
| { }
|
|
|
| SkRect fRect;
|
| @@ -134,8 +135,14 @@ public:
|
| SkString fText;
|
| const SkPoint* fPoints2;
|
| SkBitmap fBitmap;
|
| + SkAutoTUnref<const SkImage> fImage;
|
|
|
| private:
|
| + static const SkImage* createImage(SkColor color) {
|
| + SkAutoTUnref<SkSurface> surface (createSurface(color));
|
| +
|
| + return surface->newImageSnapshot();
|
| + }
|
| static SkMatrix TestMatrix() {
|
| SkMatrix matrix;
|
| matrix.reset();
|
| @@ -373,6 +380,9 @@ SIMPLE_TEST_STEP(DrawData, drawData(d.fText.c_str(), d.fText.size()));
|
| SIMPLE_TEST_STEP(BeginGroup, beginCommentGroup(d.fText.c_str()));
|
| SIMPLE_TEST_STEP(AddComment, addComment(d.fText.c_str(), d.fText.c_str()));
|
| SIMPLE_TEST_STEP(EndGroup, endCommentGroup());
|
| +SIMPLE_TEST_STEP(DrawImage, drawImage(d.fImage, 0, 0));
|
| +SIMPLE_TEST_STEP(DrawImageRect, drawImageRect(d.fImage, 0, d.fRect));
|
| +
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
| // Complex test steps
|
|
|