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 ff4549feb805873272ce4085e076a02e404b1108..22e556dcbde063cd5c50b360fb5fb10b6f23da09 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp |
@@ -1125,8 +1125,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()) { |
@@ -1158,8 +1158,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()); |
@@ -1186,8 +1186,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(); |
@@ -1222,9 +1222,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. |
@@ -1251,9 +1251,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) |