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

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

Issue 2307143002: Remove non-layer-list codepath from PaintArtifactCompositor (Closed)
Patch Set: Formatting cleanup Created 4 years, 3 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
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // placeholder layers required. 55 // placeholder layers required.
56 struct ExtraDataForTesting { 56 struct ExtraDataForTesting {
57 Vector<scoped_refptr<cc::Layer>> contentLayers; 57 Vector<scoped_refptr<cc::Layer>> contentLayers;
58 }; 58 };
59 void enableExtraDataForTesting() { m_extraDataForTestingEnabled = true; } 59 void enableExtraDataForTesting() { m_extraDataForTestingEnabled = true; }
60 ExtraDataForTesting* getExtraDataForTesting() const { return m_extraDataForT esting.get(); } 60 ExtraDataForTesting* getExtraDataForTesting() const { return m_extraDataForT esting.get(); }
61 61
62 private: 62 private:
63 class ContentLayerClientImpl; 63 class ContentLayerClientImpl;
64 64
65 void updateInLayerListMode(const PaintArtifact&);
66
67 // Builds a leaf layer that represents a single paint chunk. 65 // Builds a leaf layer that represents a single paint chunk.
68 // Note: cc::Layer API assumes the layer bounds to start at (0, 0) but the b ounding box of 66 // Note: cc::Layer API assumes the layer bounds to start at (0, 0) but the b ounding box of
69 // a paint chunk does not necessarily start at (0, 0) and could even be nega tive. Internally 67 // a paint chunk does not necessarily start at (0, 0) and could even be nega tive. Internally
70 // the generated layer translates the paint chunk to align the bounding box to (0, 0) and 68 // the generated layer translates the paint chunk to align the bounding box to (0, 0) and
71 // return the actual origin of the paint chunk in output parameter layerOffs et. 69 // return the actual origin of the paint chunk in output parameter layerOffs et.
72 scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const Pain tChunk&, gfx::Vector2dF& layerOffset); 70 scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const Pain tChunk&, gfx::Vector2dF& layerOffset);
73 71
74 scoped_refptr<cc::Layer> m_rootLayer; 72 scoped_refptr<cc::Layer> m_rootLayer;
75 std::unique_ptr<WebLayer> m_webLayer; 73 std::unique_ptr<WebLayer> m_webLayer;
76 Vector<std::unique_ptr<ContentLayerClientImpl>> m_contentLayerClients; 74 Vector<std::unique_ptr<ContentLayerClientImpl>> m_contentLayerClients;
77 75
78 bool m_extraDataForTestingEnabled = false; 76 bool m_extraDataForTestingEnabled = false;
79 std::unique_ptr<ExtraDataForTesting> m_extraDataForTesting; 77 std::unique_ptr<ExtraDataForTesting> m_extraDataForTesting;
80 }; 78 };
81 79
82 } // namespace blink 80 } // namespace blink
83 81
84 #endif // PaintArtifactCompositor_h 82 #endif // PaintArtifactCompositor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698