| 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" |
| 14 #include "public/platform/WebLayerScrollClient.h" |
| 13 #include "wtf/Noncopyable.h" | 15 #include "wtf/Noncopyable.h" |
| 14 #include "wtf/PtrUtil.h" | 16 #include "wtf/PtrUtil.h" |
| 15 #include "wtf/Vector.h" | 17 #include "wtf/Vector.h" |
| 16 #include <memory> | |
| 17 | 18 |
| 18 namespace cc { | 19 namespace cc { |
| 19 class DisplayItemList; | 20 class DisplayItemList; |
| 20 class Layer; | 21 class Layer; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace gfx { | 24 namespace gfx { |
| 24 class Vector2dF; | 25 class Vector2dF; |
| 25 } | 26 } |
| 26 | 27 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 42 class PLATFORM_EXPORT PaintArtifactCompositor { | 43 class PLATFORM_EXPORT PaintArtifactCompositor { |
| 43 WTF_MAKE_NONCOPYABLE(PaintArtifactCompositor); | 44 WTF_MAKE_NONCOPYABLE(PaintArtifactCompositor); |
| 44 | 45 |
| 45 public: | 46 public: |
| 46 ~PaintArtifactCompositor(); | 47 ~PaintArtifactCompositor(); |
| 47 | 48 |
| 48 static std::unique_ptr<PaintArtifactCompositor> create() { | 49 static std::unique_ptr<PaintArtifactCompositor> create() { |
| 49 return WTF::wrapUnique(new PaintArtifactCompositor()); | 50 return WTF::wrapUnique(new PaintArtifactCompositor()); |
| 50 } | 51 } |
| 51 | 52 |
| 53 using ScrollClientMap = |
| 54 HashMap<const ScrollPaintPropertyNode*, WebLayerScrollClient*>; |
| 55 |
| 52 // Updates the layer tree to match the provided paint artifact. | 56 // Updates the layer tree to match the provided paint artifact. |
| 53 // If |storeDebugInfo| is true, stores detailed debugging information in | 57 // If |storeDebugInfo| is true, stores detailed debugging information in |
| 54 // the layers that will be output as part of a call to layersAsJSON | 58 // the layers that will be output as part of a call to layersAsJSON |
| 55 // (if LayerTreeIncludesDebugInfo is specified). | 59 // (if LayerTreeIncludesDebugInfo is specified). |
| 56 void update( | 60 void update( |
| 57 const PaintArtifact&, | 61 const PaintArtifact&, |
| 58 RasterInvalidationTrackingMap<const PaintChunk>* paintChunkInvalidations, | 62 RasterInvalidationTrackingMap<const PaintChunk>* paintChunkInvalidations, |
| 59 bool storeDebugInfo, | 63 bool storeDebugInfo, |
| 60 GeometryMapper&); | 64 GeometryMapper&, |
| 65 ScrollClientMap&); |
| 61 | 66 |
| 62 // The root layer of the tree managed by this object. | 67 // The root layer of the tree managed by this object. |
| 63 cc::Layer* rootLayer() const { return m_rootLayer.get(); } | 68 cc::Layer* rootLayer() const { return m_rootLayer.get(); } |
| 64 | 69 |
| 65 // Wraps rootLayer(), so that it can be attached as a child of another | 70 // Wraps rootLayer(), so that it can be attached as a child of another |
| 66 // WebLayer. | 71 // WebLayer. |
| 67 WebLayer* getWebLayer() const { return m_webLayer.get(); } | 72 WebLayer* getWebLayer() const { return m_webLayer.get(); } |
| 68 | 73 |
| 69 // Returns extra information recorded during unit tests. | 74 // Returns extra information recorded during unit tests. |
| 70 // While not part of the normal output of this class, this provides a simple | 75 // While not part of the normal output of this class, this provides a simple |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 PendingLayer); | 208 PendingLayer); |
| 204 FRIEND_TEST_ALL_PREFIXES(PaintArtifactCompositorTestWithPropertyTrees, | 209 FRIEND_TEST_ALL_PREFIXES(PaintArtifactCompositorTestWithPropertyTrees, |
| 205 PendingLayerWithGeometry); | 210 PendingLayerWithGeometry); |
| 206 FRIEND_TEST_ALL_PREFIXES(PaintArtifactCompositorTestWithPropertyTrees, | 211 FRIEND_TEST_ALL_PREFIXES(PaintArtifactCompositorTestWithPropertyTrees, |
| 207 PendingLayerKnownOpaque); | 212 PendingLayerKnownOpaque); |
| 208 }; | 213 }; |
| 209 | 214 |
| 210 } // namespace blink | 215 } // namespace blink |
| 211 | 216 |
| 212 #endif // PaintArtifactCompositor_h | 217 #endif // PaintArtifactCompositor_h |
| OLD | NEW |