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

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..6416deca9142d325d499e420e3db2da8efb873d1 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,14 @@ struct PaintChunk;
class PLATFORM_EXPORT PaintArtifactCompositor {
WTF_MAKE_NONCOPYABLE(PaintArtifactCompositor);
public:
- PaintArtifactCompositor();
~PaintArtifactCompositor();
+ static std::unique_ptr<PaintArtifactCompositor> create()
+ {
+ return wrapUnique(new PaintArtifactCompositor());
+ }
+
pdr. 2016/09/15 20:53:07 Nit: extra space
chrishtr 2016/09/15 21:05:39 Done.
+
// Updates the layer tree to match the provided paint artifact.
void update(const PaintArtifact&);
@@ -60,6 +66,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 +83,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