Chromium Code Reviews| Index: Source/platform/graphics/GraphicsContextTest.cpp |
| diff --git a/Source/platform/graphics/GraphicsContextTest.cpp b/Source/platform/graphics/GraphicsContextTest.cpp |
| index b161d098239defe09ca05af842ef259f517698a3..11e5df43309ca50e79f39ab058efc3e3df410546 100644 |
| --- a/Source/platform/graphics/GraphicsContextTest.cpp |
| +++ b/Source/platform/graphics/GraphicsContextTest.cpp |
| @@ -26,6 +26,7 @@ |
| #include "platform/graphics/GraphicsContext.h" |
| +#include "platform/RuntimeEnabledFeatures.h" |
| #include "platform/graphics/BitmapImage.h" |
| #include "platform/graphics/ImageBuffer.h" |
| #include "third_party/skia/include/core/SkBitmap.h" |
| @@ -209,6 +210,11 @@ TEST(GraphicsContextTest, UnboundedDrawsAreClipped) |
| TEST(GraphicsContextTest, RecordingTotalMatrix) |
| { |
| + if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
| + // GraphicsContext::getCTM() won't do the right thing in Slimming Paint, so just skip this test. |
| + return; |
| + } |
| + |
| SkBitmap bitmap; |
| bitmap.allocN32Pixels(400, 400); |
| bitmap.eraseColor(0); |
| @@ -261,8 +267,11 @@ TEST(GraphicsContextTest, RecordingCanvas) |
| SkCanvas* canvas2 = context->canvas(); |
| EXPECT_TRUE(canvas2); |
| - EXPECT_NE(canvas1, canvas2); |
| - EXPECT_TRUE(canvas1->unique()); |
| + if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
|
chrishtr
2015/06/08 23:34:58
This test makes no sense in slimming paint, just d
wkorman
2015/06/08 23:38:29
Done.
|
| + // In Slimming Paint we may re-use the canvas based on SkPictureRecorder internals. |
| + EXPECT_NE(canvas1, canvas2); |
| + EXPECT_TRUE(canvas1->unique()); |
| + } |
| // endRecording finally makes the picture accessible |
| RefPtr<const SkPicture> picture = context->endRecording(); |