OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PaintArtifactCompositor_h | 5 #ifndef PaintArtifactCompositor_h |
6 #define PaintArtifactCompositor_h | 6 #define PaintArtifactCompositor_h |
7 | 7 |
| 8 #include <memory> |
8 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
9 #include "platform/PlatformExport.h" | 10 #include "platform/PlatformExport.h" |
10 #include "platform/RuntimeEnabledFeatures.h" | 11 #include "platform/RuntimeEnabledFeatures.h" |
11 #include "platform/graphics/GraphicsLayerClient.h" | 12 #include "platform/graphics/GraphicsLayerClient.h" |
12 #include "platform/graphics/paint/PaintController.h" | 13 #include "platform/graphics/paint/PaintController.h" |
13 #include "wtf/Noncopyable.h" | 14 #include "wtf/Noncopyable.h" |
14 #include "wtf/PtrUtil.h" | 15 #include "wtf/PtrUtil.h" |
15 #include "wtf/Vector.h" | 16 #include "wtf/Vector.h" |
16 #include <memory> | |
17 | 17 |
18 namespace cc { | 18 namespace cc { |
19 class Layer; | 19 class Layer; |
20 } | 20 } |
21 | 21 |
22 namespace gfx { | 22 namespace gfx { |
23 class Vector2dF; | 23 class Vector2dF; |
24 } | 24 } |
25 | 25 |
26 namespace blink { | 26 namespace blink { |
(...skipping 15 matching lines...) Expand all Loading... |
42 WTF_MAKE_NONCOPYABLE(PaintArtifactCompositor); | 42 WTF_MAKE_NONCOPYABLE(PaintArtifactCompositor); |
43 | 43 |
44 public: | 44 public: |
45 ~PaintArtifactCompositor(); | 45 ~PaintArtifactCompositor(); |
46 | 46 |
47 static std::unique_ptr<PaintArtifactCompositor> create() { | 47 static std::unique_ptr<PaintArtifactCompositor> create() { |
48 return WTF::wrapUnique(new PaintArtifactCompositor()); | 48 return WTF::wrapUnique(new PaintArtifactCompositor()); |
49 } | 49 } |
50 | 50 |
51 // Updates the layer tree to match the provided paint artifact. | 51 // Updates the layer tree to match the provided paint artifact. |
| 52 // |
| 53 // Populates |compositedElementIds| with the CompositorElementId of all |
| 54 // animations for which we saw a paint chunk and created a layer. |
| 55 // |
52 // If |storeDebugInfo| is true, stores detailed debugging information in | 56 // If |storeDebugInfo| is true, stores detailed debugging information in |
53 // the layers that will be output as part of a call to layersAsJSON | 57 // the layers that will be output as part of a call to layersAsJSON |
54 // (if LayerTreeIncludesDebugInfo is specified). | 58 // (if LayerTreeIncludesDebugInfo is specified). |
55 void update( | 59 void update( |
56 const PaintArtifact&, | 60 const PaintArtifact&, |
57 RasterInvalidationTrackingMap<const PaintChunk>* paintChunkInvalidations, | 61 RasterInvalidationTrackingMap<const PaintChunk>* paintChunkInvalidations, |
58 bool storeDebugInfo, | 62 bool storeDebugInfo, |
59 GeometryMapper&); | 63 GeometryMapper&, |
| 64 CompositorElementIdSet& compositedElementIds); |
60 | 65 |
61 // The root layer of the tree managed by this object. | 66 // The root layer of the tree managed by this object. |
62 cc::Layer* rootLayer() const { return m_rootLayer.get(); } | 67 cc::Layer* rootLayer() const { return m_rootLayer.get(); } |
63 | 68 |
64 // Wraps rootLayer(), so that it can be attached as a child of another | 69 // Wraps rootLayer(), so that it can be attached as a child of another |
65 // WebLayer. | 70 // WebLayer. |
66 WebLayer* getWebLayer() const { return m_webLayer.get(); } | 71 WebLayer* getWebLayer() const { return m_webLayer.get(); } |
67 | 72 |
68 // Returns extra information recorded during unit tests. | 73 // Returns extra information recorded during unit tests. |
69 // While not part of the normal output of this class, this provides a simple | 74 // While not part of the normal output of this class, this provides a simple |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 PendingLayer); | 223 PendingLayer); |
219 FRIEND_TEST_ALL_PREFIXES(PaintArtifactCompositorTestWithPropertyTrees, | 224 FRIEND_TEST_ALL_PREFIXES(PaintArtifactCompositorTestWithPropertyTrees, |
220 PendingLayerWithGeometry); | 225 PendingLayerWithGeometry); |
221 FRIEND_TEST_ALL_PREFIXES(PaintArtifactCompositorTestWithPropertyTrees, | 226 FRIEND_TEST_ALL_PREFIXES(PaintArtifactCompositorTestWithPropertyTrees, |
222 PendingLayerKnownOpaque_DISABLED); | 227 PendingLayerKnownOpaque_DISABLED); |
223 }; | 228 }; |
224 | 229 |
225 } // namespace blink | 230 } // namespace blink |
226 | 231 |
227 #endif // PaintArtifactCompositor_h | 232 #endif // PaintArtifactCompositor_h |
OLD | NEW |