| 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 #ifndef TestPaintArtifact_h | 5 #ifndef TestPaintArtifact_h |
| 6 #define TestPaintArtifact_h | 6 #define TestPaintArtifact_h |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "platform/graphics/Color.h" | 9 #include "platform/graphics/Color.h" |
| 10 #include "platform/graphics/paint/DisplayItemList.h" | 10 #include "platform/graphics/paint/DisplayItemList.h" |
| 11 #include "platform/graphics/paint/PaintArtifact.h" | 11 #include "platform/graphics/paint/PaintArtifact.h" |
| 12 #include "wtf/Allocator.h" | 12 #include "wtf/Allocator.h" |
| 13 #include "wtf/OwnPtr.h" |
| 13 #include "wtf/PassRefPtr.h" | 14 #include "wtf/PassRefPtr.h" |
| 14 #include "wtf/Vector.h" | 15 #include "wtf/Vector.h" |
| 15 #include <memory> | |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 class Layer; | 18 class Layer; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace blink { | 21 namespace blink { |
| 22 | 22 |
| 23 class ClipPaintPropertyNode; | 23 class ClipPaintPropertyNode; |
| 24 class EffectPaintPropertyNode; | 24 class EffectPaintPropertyNode; |
| 25 class FloatRect; | 25 class FloatRect; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 48 TestPaintArtifact& chunk(PassRefPtr<TransformPaintPropertyNode>, PassRefPtr<
ClipPaintPropertyNode>, PassRefPtr<EffectPaintPropertyNode>); | 48 TestPaintArtifact& chunk(PassRefPtr<TransformPaintPropertyNode>, PassRefPtr<
ClipPaintPropertyNode>, PassRefPtr<EffectPaintPropertyNode>); |
| 49 TestPaintArtifact& chunk(const PaintChunkProperties&); | 49 TestPaintArtifact& chunk(const PaintChunkProperties&); |
| 50 TestPaintArtifact& rectDrawing(const FloatRect& bounds, Color); | 50 TestPaintArtifact& rectDrawing(const FloatRect& bounds, Color); |
| 51 TestPaintArtifact& foreignLayer(const FloatPoint&, const IntSize&, scoped_re
fptr<cc::Layer>); | 51 TestPaintArtifact& foreignLayer(const FloatPoint&, const IntSize&, scoped_re
fptr<cc::Layer>); |
| 52 | 52 |
| 53 // Can't add more things once this is called. | 53 // Can't add more things once this is called. |
| 54 const PaintArtifact& build(); | 54 const PaintArtifact& build(); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 class DummyRectClient; | 57 class DummyRectClient; |
| 58 Vector<std::unique_ptr<DummyRectClient>> m_dummyClients; | 58 Vector<OwnPtr<DummyRectClient>> m_dummyClients; |
| 59 | 59 |
| 60 // Exists if m_built is false. | 60 // Exists if m_built is false. |
| 61 DisplayItemList m_displayItemList; | 61 DisplayItemList m_displayItemList; |
| 62 Vector<PaintChunk> m_paintChunks; | 62 Vector<PaintChunk> m_paintChunks; |
| 63 | 63 |
| 64 // Exists if m_built is true. | 64 // Exists if m_built is true. |
| 65 PaintArtifact m_paintArtifact; | 65 PaintArtifact m_paintArtifact; |
| 66 | 66 |
| 67 bool m_built; | 67 bool m_built; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace blink | 70 } // namespace blink |
| 71 | 71 |
| 72 #endif // TestPaintArtifact_h | 72 #endif // TestPaintArtifact_h |
| OLD | NEW |