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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "platform/PlatformExport.h" | 9 #include "platform/PlatformExport.h" |
10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 class ContentLayerClientImpl; | 70 class ContentLayerClientImpl; |
71 | 71 |
72 // Builds a leaf layer that represents a single paint chunk. | 72 // Builds a leaf layer that represents a single paint chunk. |
73 // Note: cc::Layer API assumes the layer bounds to start at (0, 0) but the b
ounding box of | 73 // Note: cc::Layer API assumes the layer bounds to start at (0, 0) but the b
ounding box of |
74 // a paint chunk does not necessarily start at (0, 0) and could even be nega
tive. Internally | 74 // a paint chunk does not necessarily start at (0, 0) and could even be nega
tive. Internally |
75 // the generated layer translates the paint chunk to align the bounding box
to (0, 0) and | 75 // the generated layer translates the paint chunk to align the bounding box
to (0, 0) and |
76 // return the actual origin of the paint chunk in output parameter layerOffs
et. | 76 // return the actual origin of the paint chunk in output parameter layerOffs
et. |
77 scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const Pain
tChunk&, gfx::Vector2dF& layerOffset); | 77 scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const Pain
tChunk&, gfx::Vector2dF& layerOffset); |
78 | 78 |
| 79 // Finds a client among the current vector of clients that matches the paint
chunk's id, |
| 80 // or otherwise allocates a new one. |
| 81 std::unique_ptr<ContentLayerClientImpl> clientForPaintChunk(const PaintChunk
&); |
| 82 |
79 scoped_refptr<cc::Layer> m_rootLayer; | 83 scoped_refptr<cc::Layer> m_rootLayer; |
80 std::unique_ptr<WebLayer> m_webLayer; | 84 std::unique_ptr<WebLayer> m_webLayer; |
81 Vector<std::unique_ptr<ContentLayerClientImpl>> m_contentLayerClients; | 85 Vector<std::unique_ptr<ContentLayerClientImpl>> m_currentContentLayerClients
; |
| 86 Vector<std::unique_ptr<ContentLayerClientImpl>> m_newContentLayerClients; |
82 | 87 |
83 bool m_extraDataForTestingEnabled = false; | 88 bool m_extraDataForTestingEnabled = false; |
84 std::unique_ptr<ExtraDataForTesting> m_extraDataForTesting; | 89 std::unique_ptr<ExtraDataForTesting> m_extraDataForTesting; |
85 friend class StubChromeClientForSPv2; | 90 friend class StubChromeClientForSPv2; |
86 }; | 91 }; |
87 | 92 |
88 } // namespace blink | 93 } // namespace blink |
89 | 94 |
90 #endif // PaintArtifactCompositor_h | 95 #endif // PaintArtifactCompositor_h |
OLD | NEW |