Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h

Issue 2049933003: Add effect node support in PaintArtifactCompositor for layer list mode [2/4] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pac_layer_list_step_1
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 // 33 //
34 // PaintArtifactCompositor is the successor to PaintLayerCompositor, reflecting 34 // PaintArtifactCompositor is the successor to PaintLayerCompositor, reflecting
35 // the new home of compositing decisions after paint in Slimming Paint v2. 35 // the new home of compositing decisions after paint in Slimming Paint v2.
36 class PLATFORM_EXPORT PaintArtifactCompositor { 36 class PLATFORM_EXPORT PaintArtifactCompositor {
37 WTF_MAKE_NONCOPYABLE(PaintArtifactCompositor); 37 WTF_MAKE_NONCOPYABLE(PaintArtifactCompositor);
38 public: 38 public:
39 PaintArtifactCompositor(); 39 PaintArtifactCompositor();
40 ~PaintArtifactCompositor(); 40 ~PaintArtifactCompositor();
41 41
42 // Updates the layer tree to match the provided paint artifact. 42 // Updates the layer tree to match the provided paint artifact.
43 // Creates the root layer if not already done.
44 void update(const PaintArtifact&); 43 void update(const PaintArtifact&);
45 44
46 // The root layer of the tree managed by this object. 45 // The root layer of the tree managed by this object.
47 cc::Layer* rootLayer() const { return m_rootLayer.get(); } 46 cc::Layer* rootLayer() const { return m_rootLayer.get(); }
48 47
49 // 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
50 // WebLayer. 49 // WebLayer.
51 WebLayer* getWebLayer() const { return m_webLayer.get(); } 50 WebLayer* getWebLayer() const { return m_webLayer.get(); }
52 51
53 private: 52 private:
54 class ContentLayerClientImpl; 53 class ContentLayerClientImpl;
55 54
55 void updateInLayerListMode(const PaintArtifact&);
56
56 // Builds a leaf layer that represents a single paint chunk. 57 // Builds a leaf layer that represents a single paint chunk.
57 // Note: cc::Layer API assumes the layer bounds to start at (0, 0) but the b ounding box of 58 // Note: cc::Layer API assumes the layer bounds to start at (0, 0) but the b ounding box of
58 // a paint chunk does not necessarily start at (0, 0) and could even be nega tive. Internally 59 // a paint chunk does not necessarily start at (0, 0) and could even be nega tive. Internally
59 // the generated layer translates the paint chunk to align the bounding box to (0, 0) and 60 // the generated layer translates the paint chunk to align the bounding box to (0, 0) and
60 // return the actual origin of the paint chunk in output parameter layerOffs et. 61 // return the actual origin of the paint chunk in output parameter layerOffs et.
61 scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const Pain tChunk&, gfx::Vector2dF& layerOffset); 62 scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const Pain tChunk&, gfx::Vector2dF& layerOffset);
62 63
63 scoped_refptr<cc::Layer> m_rootLayer; 64 scoped_refptr<cc::Layer> m_rootLayer;
64 OwnPtr<WebLayer> m_webLayer; 65 OwnPtr<WebLayer> m_webLayer;
65 Vector<OwnPtr<ContentLayerClientImpl>> m_contentLayerClients; 66 Vector<OwnPtr<ContentLayerClientImpl>> m_contentLayerClients;
66 }; 67 };
67 68
68 } // namespace blink 69 } // namespace blink
69 70
70 #endif // PaintArtifactCompositor_h 71 #endif // PaintArtifactCompositor_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698