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 b543aa136cc759fb4dd068abc9c86a7ce62efc07..fae0bf4808c0486c947a4511262d231c2671dd3d 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 proxy_id, |
+ uint64_t element_id, |
+ uint32_t mutable_properties); |
+ void UnregisterCompositorProxy(uint64_t proxy_id); |
// cc::LayerTreeMutator |
bool Mutate(base::TimeTicks monotonic_time, cc::LayerTreeImpl*) override; |
@@ -34,8 +43,19 @@ class PLATFORM_EXPORT CompositorMutatorClient |
void SetMutationsForTesting(std::unique_ptr<CompositorMutations>); |
private: |
+ void SnapshotLayerTree(const cc::LayerTreeImpl*, |
+ ProxyCompositorMutablePropertiesMap*) const; |
+ void UpdateLayerTree(cc::LayerTreeImpl*, |
+ uint64_t element_id, |
+ const CompositorMutation*); |
+ void UpdateMutations(uint64_t element_id, |
+ std::unique_ptr<CompositorMutation>); |
+ |
cc::LayerTreeMutatorClient* client_; |
CompositorMutationsTarget* mutations_target_; |
+ // Maps from a |CompositorProxy| id to a pair of the element id for that |
+ // proxy, and the bitmask of properties the proxy is allowed to mutate. |
+ std::map<uint64_t, std::pair<uint64_t, uint32_t>> input_properties_; |
// Accessed by main and compositor threads. |
CrossThreadPersistent<CompositorMutator> mutator_; |
std::unique_ptr<CompositorMutations> mutations_; |