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

Unified Diff: third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.h

Issue 2765053002: Avoid exposing cc::Layer tree to CompositorProxy (Closed)
Patch Set: Minor changes Created 3 years, 9 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/CompositorMutatorClient.h
diff --git a/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.h b/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.h
index 114967af10efd33819dc3a9b180a4c876bd38367..386e7500d103c58df9cbef102385c558097dd29a 100644
--- a/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.h
+++ b/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.h
@@ -5,16 +5,21 @@
#ifndef CompositorMutatorClient_h
#define CompositorMutatorClient_h
+#include <map>
+#include <memory>
+#include <utility>
+
#include "platform/PlatformExport.h"
+#include "platform/graphics/CompositorMutableProperties.h"
#include "platform/heap/Handle.h"
#include "public/platform/WebCompositorMutatorClient.h"
-#include <memory>
namespace blink {
class CompositorMutator;
struct CompositorMutations;
class CompositorMutationsTarget;
+class CompositorMutation;
class PLATFORM_EXPORT CompositorMutatorClient
: public WebCompositorMutatorClient {
@@ -23,6 +28,10 @@ class PLATFORM_EXPORT CompositorMutatorClient
virtual ~CompositorMutatorClient();
void setNeedsMutate();
+ void registerCompositorProxy(uint64_t proxyId,
+ uint64_t elementId,
+ uint32_t mutableProperties);
+ void unregisterCompositorProxy(uint64_t proxyId);
// cc::LayerTreeMutator
bool Mutate(base::TimeTicks monotonicTime, cc::LayerTreeImpl*) override;
@@ -34,8 +43,13 @@ class PLATFORM_EXPORT CompositorMutatorClient
void setMutationsForTesting(std::unique_ptr<CompositorMutations>);
private:
+ void snapshotLayerTree(const cc::LayerTreeImpl*,
+ ProxyCompositorMutablePropertiesMap*) const;
+ void updateMutations(uint64_t elementId, std::unique_ptr<CompositorMutation>);
+
cc::LayerTreeMutatorClient* m_client;
CompositorMutationsTarget* m_mutationsTarget;
+ std::map<uint64_t, std::pair<uint64_t, uint32_t>> m_inputProperties;
flackr 2017/04/03 17:09:19 Comment what the map is from / to.
smcgruer 2017/04/03 19:37:11 Done.
// Accessed by main and compositor threads.
CrossThreadPersistent<CompositorMutator> m_mutator;
std::unique_ptr<CompositorMutations> m_mutations;

Powered by Google App Engine
This is Rietveld 408576698