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

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..abcdd99c33b9c6120322a8729d77c9146ebb4913 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
@@ -74,11 +74,16 @@ private:
// a paint chunk does not necessarily start at (0, 0) and could even be negative. Internally
// the generated layer translates the paint chunk to align the bounding box to (0, 0) and
// return the actual origin of the paint chunk in output parameter layerOffset.
- scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const PaintChunk&, gfx::Vector2dF& layerOffset);
+ scoped_refptr<cc::Layer> layerForPaintChunk(const PaintArtifact&, const PaintChunk&, gfx::Vector2dF& layerOffset,
+ Vector<std::unique_ptr<ContentLayerClientImpl>>& newContentLayerClients);
+
+ // 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;
pdr. 2016/09/21 22:45:12 Nit: revert this back to m_contentLayerClients
chrishtr 2016/09/22 16:51:33 Done.
bool m_extraDataForTestingEnabled = false;
std::unique_ptr<ExtraDataForTesting> m_extraDataForTesting;

Powered by Google App Engine
This is Rietveld 408576698