Index: cc/blink/web_mutable_state_impl.h |
diff --git a/cc/blink/web_mutable_state_impl.h b/cc/blink/web_mutable_state_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..700d196e8ca6a5f0a6a40c1306749953909092d8 |
--- /dev/null |
+++ b/cc/blink/web_mutable_state_impl.h |
@@ -0,0 +1,66 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CC_BLINK_WEB_MUTABLE_STATE_IMPL_H_ |
+#define CC_BLINK_WEB_MUTABLE_STATE_IMPL_H_ |
+ |
+#include <map> |
+ |
+#include "cc/blink/cc_blink_export.h" |
+ |
+#include "third_party/WebKit/public/platform/WebMutableState.h" |
+ |
+namespace cc { |
+class LayerImpl; |
+class LayerTreeImpl; |
+struct LayerTreeMutation; |
+typedef std::map<uint64_t, LayerTreeMutation> LayerTreeMutationMap; |
+} |
+ |
+namespace cc_blink { |
+ |
+class CC_BLINK_EXPORT WebMutableStateImpl : public blink::WebMutableState { |
+ public: |
+ WebMutableStateImpl(cc::LayerTreeMutation* mutation, |
+ cc::LayerImpl* main_layer, |
+ cc::LayerImpl* scroll_layer); |
+ ~WebMutableStateImpl() override; |
+ |
+ double getOpacity() const override; |
+ void setOpacity(double opacity) override; |
+ |
+ const SkMatrix44& getTransform() const override; |
+ void setTransform(const SkMatrix44& transform) override; |
+ |
+ double getScrollLeft() const override; |
+ void setScrollLeft(double scroll_left) override; |
+ |
+ double getScrollTop() const override; |
+ void setScrollTop(double scroll_top) override; |
+ |
+ private: |
+ cc::LayerTreeMutation* mutation_; |
+ cc::LayerImpl* main_layer_; |
+ cc::LayerImpl* scroll_layer_; |
+}; |
+ |
+class CC_BLINK_EXPORT WebMutableStateProviderImpl |
enne (OOO)
2015/11/16 19:12:33
Different classes, different files?
Ian Vollick
2015/11/18 17:20:33
Done.
|
+ : public blink::WebMutableStateProvider { |
+ public: |
+ // TODO(vollick): after slimming paint v2, this will need to operate on |
+ // property trees, no the layer tree impl. |
enne (OOO)
2015/11/16 19:12:33
*not
Ian Vollick
2015/11/18 17:20:33
Done.
|
+ WebMutableStateProviderImpl(cc::LayerTreeImpl* state, |
enne (OOO)
2015/11/16 19:12:33
Who owns these pointers?
Ian Vollick
2015/11/18 17:20:33
Caller owns them. Added a comment.
|
+ cc::LayerTreeMutationMap* mutations); |
+ ~WebMutableStateProviderImpl() override; |
+ |
+ blink::WebMutableState* getMutableStateFor(uint64_t element_id) override; |
+ |
+ private: |
+ cc::LayerTreeImpl* state_; |
+ cc::LayerTreeMutationMap* mutations_; |
+}; |
+ |
+} // namespace cc_blink |
+ |
+#endif // CC_BLINK_WEB_MUTABLE_STATE_IMPL_H_ |