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

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

Issue 2342103002: Refactor the way PaintArtifactCompositor is attached and used. (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 c74fa8699455621ffcd5e6db11ca38e78c3f8040..34b6e2f9f104ae073f907d5b8bce778bf9b087af 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h
@@ -8,6 +8,7 @@
#include "base/memory/ref_counted.h"
#include "platform/PlatformExport.h"
#include "wtf/Noncopyable.h"
+#include "wtf/PtrUtil.h"
#include "wtf/Vector.h"
#include <memory>
@@ -36,9 +37,13 @@ struct PaintChunk;
class PLATFORM_EXPORT PaintArtifactCompositor {
WTF_MAKE_NONCOPYABLE(PaintArtifactCompositor);
public:
- PaintArtifactCompositor();
~PaintArtifactCompositor();
+ static std::unique_ptr<PaintArtifactCompositor> create()
+ {
+ return wrapUnique(new PaintArtifactCompositor());
+ }
+
// Updates the layer tree to match the provided paint artifact.
void update(const PaintArtifact&);
@@ -60,6 +65,8 @@ public:
ExtraDataForTesting* getExtraDataForTesting() const { return m_extraDataForTesting.get(); }
private:
+ PaintArtifactCompositor();
+
class ContentLayerClientImpl;
// Builds a leaf layer that represents a single paint chunk.
@@ -75,6 +82,7 @@ private:
bool m_extraDataForTestingEnabled = false;
std::unique_ptr<ExtraDataForTesting> m_extraDataForTesting;
+ friend class StubChromeClientForSPv2;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698