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

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..09471226ed730b1212a0a63f8f678560277cc325 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
@@ -74,7 +74,12 @@ 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;

Powered by Google App Engine
This is Rietveld 408576698