| Index: third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp
|
| index 2249f1768fccf2982d57565fd78bf0e097a350ad..ab9f34fe6eab9e123995a04ff00bbf276c503924 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp
|
| @@ -1133,8 +1133,8 @@ TEST_P(PaintControllerTest, SkipCache)
|
| TestDisplayItem(multicol, backgroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType));
|
| - RefPtr<const SkPicture> picture1 = static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[1]).picture();
|
| - RefPtr<const SkPicture> picture2 = static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[2]).picture();
|
| + sk_sp<const SkPicture> picture1 = sk_ref_sp(static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[1]).picture());
|
| + sk_sp<const SkPicture> picture2 = sk_ref_sp(static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[2]).picture());
|
| EXPECT_NE(picture1, picture2);
|
|
|
| if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| @@ -1166,8 +1166,8 @@ TEST_P(PaintControllerTest, SkipCache)
|
| TestDisplayItem(multicol, backgroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType));
|
| - EXPECT_NE(picture1, static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[1]).picture());
|
| - EXPECT_NE(picture2, static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[2]).picture());
|
| + EXPECT_NE(picture1.get(), static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[1]).picture());
|
| + EXPECT_NE(picture2.get(), static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[2]).picture());
|
|
|
| if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| EXPECT_EQ(1u, getPaintController().paintChunks().size());
|
| @@ -1194,8 +1194,8 @@ TEST_P(PaintControllerTest, SkipCache)
|
| TestDisplayItem(content, foregroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType));
|
| - EXPECT_NE(picture1, static_cast<const DrawingDisplayItem&>(getPaintController().newDisplayItemList()[1]).picture());
|
| - EXPECT_NE(picture2, static_cast<const DrawingDisplayItem&>(getPaintController().newDisplayItemList()[2]).picture());
|
| + EXPECT_NE(picture1.get(), static_cast<const DrawingDisplayItem&>(getPaintController().newDisplayItemList()[1]).picture());
|
| + EXPECT_NE(picture2.get(), static_cast<const DrawingDisplayItem&>(getPaintController().newDisplayItemList()[2]).picture());
|
|
|
| getPaintController().commitNewDisplayItems();
|
|
|
| @@ -1230,9 +1230,9 @@ TEST_P(PaintControllerTest, PartialSkipCache)
|
| TestDisplayItem(content, backgroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType));
|
| - RefPtr<const SkPicture> picture0 = static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[0]).picture();
|
| - RefPtr<const SkPicture> picture1 = static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[1]).picture();
|
| - RefPtr<const SkPicture> picture2 = static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[2]).picture();
|
| + sk_sp<const SkPicture> picture0 = sk_ref_sp(static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[0]).picture());
|
| + sk_sp<const SkPicture> picture1 = sk_ref_sp(static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[1]).picture());
|
| + sk_sp<const SkPicture> picture2 = sk_ref_sp(static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[2]).picture());
|
| EXPECT_NE(picture1, picture2);
|
|
|
| // Content's cache is invalid because it has display items skipped cache.
|
| @@ -1259,9 +1259,9 @@ TEST_P(PaintControllerTest, PartialSkipCache)
|
| TestDisplayItem(content, backgroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType),
|
| TestDisplayItem(content, foregroundDrawingType));
|
| - EXPECT_NE(picture0, static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[0]).picture());
|
| - EXPECT_NE(picture1, static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[1]).picture());
|
| - EXPECT_NE(picture2, static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[2]).picture());
|
| + EXPECT_NE(picture0.get(), static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[0]).picture());
|
| + EXPECT_NE(picture1.get(), static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[1]).picture());
|
| + EXPECT_NE(picture2.get(), static_cast<const DrawingDisplayItem&>(getPaintController().getDisplayItemList()[2]).picture());
|
| }
|
|
|
| TEST_F(PaintControllerTestBase, OptimizeNoopPairs)
|
|
|