| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // Updates the layer tree to match the provided paint artifact. | 41 // Updates the layer tree to match the provided paint artifact. |
| 42 // Creates the root layer if not already done. | 42 // Creates the root layer if not already done. |
| 43 void update(const PaintArtifact&); | 43 void update(const PaintArtifact&); |
| 44 | 44 |
| 45 // The root layer of the tree managed by this object. | 45 // The root layer of the tree managed by this object. |
| 46 cc::Layer* rootLayer() const { return m_rootLayer.get(); } | 46 cc::Layer* rootLayer() const { return m_rootLayer.get(); } |
| 47 | 47 |
| 48 // Wraps rootLayer(), so that it can be attached as a child of another | 48 // Wraps rootLayer(), so that it can be attached as a child of another |
| 49 // WebLayer. | 49 // WebLayer. |
| 50 WebLayer* webLayer() const { return m_webLayer.get(); } | 50 WebLayer* getWebLayer() const { return m_webLayer.get(); } |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 class ContentLayerClientImpl; | 53 class ContentLayerClientImpl; |
| 54 | 54 |
| 55 // Builds a leaf layer that represents a single paint chunk. | 55 // Builds a leaf layer that represents a single paint chunk. |
| 56 scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const Pain
tChunk&, gfx::Transform); | 56 scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const Pain
tChunk&, gfx::Transform); |
| 57 | 57 |
| 58 scoped_refptr<cc::Layer> m_rootLayer; | 58 scoped_refptr<cc::Layer> m_rootLayer; |
| 59 OwnPtr<WebLayer> m_webLayer; | 59 OwnPtr<WebLayer> m_webLayer; |
| 60 Vector<OwnPtr<ContentLayerClientImpl>> m_contentLayerClients; | 60 Vector<OwnPtr<ContentLayerClientImpl>> m_contentLayerClients; |
| 61 | 61 |
| 62 // For ~PaintArtifactCompositor on MSVC. | 62 // For ~PaintArtifactCompositor on MSVC. |
| 63 friend struct WTF::OwnedPtrDeleter<ContentLayerClientImpl>; | 63 friend struct WTF::OwnedPtrDeleter<ContentLayerClientImpl>; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace blink | 66 } // namespace blink |
| 67 | 67 |
| 68 #endif // PaintArtifactCompositor_h | 68 #endif // PaintArtifactCompositor_h |
| OLD | NEW |