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

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

Issue 2345233004: Reuse cc::PictureLayers when possible for SPv2. (Closed)
Patch Set: none 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
index 34b6e2f9f104ae073f907d5b8bce778bf9b087af..ab8f89978d2dde4e5778c4d8ddb074fc285d108b 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
@@ -76,9 +76,14 @@ private:
// return the actual origin of the paint chunk in output parameter layerOffset.
scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const PaintChunk&, gfx::Vector2dF& layerOffset);
+ // Finds a client among the current vector of clients that matches the paint chunk's id,
+ // or otherwise allocates a new one.
+ std::unique_ptr<ContentLayerClientImpl> clientForPaintChunk(const PaintChunk&);
+
scoped_refptr<cc::Layer> m_rootLayer;
std::unique_ptr<WebLayer> m_webLayer;
- Vector<std::unique_ptr<ContentLayerClientImpl>> m_contentLayerClients;
+ Vector<std::unique_ptr<ContentLayerClientImpl>> m_currentContentLayerClients;
+ Vector<std::unique_ptr<ContentLayerClientImpl>> m_newContentLayerClients;
bool m_extraDataForTestingEnabled = false;
std::unique_ptr<ExtraDataForTesting> m_extraDataForTesting;

Powered by Google App Engine
This is Rietveld 408576698