| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/testing/TestPaintArtifact.h" | 5 #include "platform/testing/TestPaintArtifact.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "cc/layers/layer.h" | 8 #include "cc/layers/layer.h" |
| 8 #include "platform/graphics/paint/DisplayItemClient.h" | 9 #include "platform/graphics/paint/DisplayItemClient.h" |
| 9 #include "platform/graphics/paint/DrawingDisplayItem.h" | 10 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 10 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" | 11 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" |
| 11 #include "platform/graphics/paint/PaintArtifact.h" | 12 #include "platform/graphics/paint/PaintArtifact.h" |
| 12 #include "platform/graphics/paint/PaintFlags.h" | 13 #include "platform/graphics/paint/PaintFlags.h" |
| 13 #include "platform/graphics/paint/PaintRecord.h" | 14 #include "platform/graphics/paint/PaintRecord.h" |
| 14 #include "platform/graphics/paint/PaintRecorder.h" | 15 #include "platform/graphics/paint/PaintRecorder.h" |
| 15 #include "platform/graphics/skia/SkiaUtils.h" | 16 #include "platform/graphics/skia/SkiaUtils.h" |
| 16 #include "wtf/Assertions.h" | 17 #include "wtf/Assertions.h" |
| 17 #include "wtf/PtrUtil.h" | 18 #include "wtf/PtrUtil.h" |
| 18 #include <memory> | |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 class TestPaintArtifact::DummyRectClient : public DisplayItemClient { | 22 class TestPaintArtifact::DummyRectClient : public DisplayItemClient { |
| 23 USING_FAST_MALLOC(DummyRectClient); | 23 USING_FAST_MALLOC(DummyRectClient); |
| 24 | 24 |
| 25 public: | 25 public: |
| 26 DummyRectClient(const FloatRect& rect, Color color) | 26 DummyRectClient(const FloatRect& rect, Color color) |
| 27 : m_rect(rect), m_color(color) {} | 27 : m_rect(rect), m_color(color) {} |
| 28 String debugName() const final { return "<dummy>"; } | 28 String debugName() const final { return "<dummy>"; } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 if (!m_paintChunks.isEmpty()) | 99 if (!m_paintChunks.isEmpty()) |
| 100 m_paintChunks.back().endIndex = m_displayItemList.size(); | 100 m_paintChunks.back().endIndex = m_displayItemList.size(); |
| 101 m_paintArtifact = PaintArtifact(std::move(m_displayItemList), | 101 m_paintArtifact = PaintArtifact(std::move(m_displayItemList), |
| 102 std::move(m_paintChunks), true); | 102 std::move(m_paintChunks), true); |
| 103 m_built = true; | 103 m_built = true; |
| 104 return m_paintArtifact; | 104 return m_paintArtifact; |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace blink | 107 } // namespace blink |
| OLD | NEW |