OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/graphics/paint/PaintController.h" | 5 #include "platform/graphics/paint/PaintController.h" |
6 | 6 |
7 #include "platform/RuntimeEnabledFeatures.h" | 7 #include "platform/RuntimeEnabledFeatures.h" |
8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
9 #include "platform/graphics/paint/ClipPathDisplayItem.h" | 9 #include "platform/graphics/paint/ClipPathDisplayItem.h" |
10 #include "platform/graphics/paint/ClipPathRecorder.h" | 10 #include "platform/graphics/paint/ClipPathRecorder.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 static_cast<DisplayItem::Type>(DisplayItem::kDrawingPaintPhaseFirst + 4); | 59 static_cast<DisplayItem::Type>(DisplayItem::kDrawingPaintPhaseFirst + 4); |
60 const DisplayItem::Type backgroundDrawingType = | 60 const DisplayItem::Type backgroundDrawingType = |
61 DisplayItem::kDrawingPaintPhaseFirst; | 61 DisplayItem::kDrawingPaintPhaseFirst; |
62 const DisplayItem::Type clipType = DisplayItem::kClipFirst; | 62 const DisplayItem::Type clipType = DisplayItem::kClipFirst; |
63 | 63 |
64 class TestDisplayItem final : public DisplayItem { | 64 class TestDisplayItem final : public DisplayItem { |
65 public: | 65 public: |
66 TestDisplayItem(const FakeDisplayItemClient& client, Type type) | 66 TestDisplayItem(const FakeDisplayItemClient& client, Type type) |
67 : DisplayItem(client, type, sizeof(*this)) {} | 67 : DisplayItem(client, type, sizeof(*this)) {} |
68 | 68 |
69 void replay(GraphicsContext&) const final { ASSERT_NOT_REACHED(); } | 69 void replay(GraphicsContext&) const final { NOTREACHED(); } |
70 void appendToWebDisplayItemList(const IntRect&, | 70 void appendToWebDisplayItemList(const IntRect&, |
71 WebDisplayItemList*) const final { | 71 WebDisplayItemList*) const final { |
72 ASSERT_NOT_REACHED(); | 72 NOTREACHED(); |
73 } | 73 } |
74 }; | 74 }; |
75 | 75 |
76 #ifndef NDEBUG | 76 #ifndef NDEBUG |
77 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ | 77 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ |
78 String trace = String::format("%d: ", (int)i) + "Expected: " + \ | 78 String trace = String::format("%d: ", (int)i) + "Expected: " + \ |
79 (expected).asDebugString() + " Actual: " + \ | 79 (expected).asDebugString() + " Actual: " + \ |
80 (actual).asDebugString(); \ | 80 (actual).asDebugString(); \ |
81 SCOPED_TRACE(trace.utf8().data()); | 81 SCOPED_TRACE(trace.utf8().data()); |
82 #else | 82 #else |
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2345 } | 2345 } |
2346 | 2346 |
2347 TEST_F(PaintControllerUnderInvalidationTest, | 2347 TEST_F(PaintControllerUnderInvalidationTest, |
2348 FoldCompositingDrawingInSubsequence) { | 2348 FoldCompositingDrawingInSubsequence) { |
2349 testFoldCompositingDrawingInSubsequence(); | 2349 testFoldCompositingDrawingInSubsequence(); |
2350 } | 2350 } |
2351 | 2351 |
2352 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID) | 2352 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID) |
2353 | 2353 |
2354 } // namespace blink | 2354 } // namespace blink |
OLD | NEW |