Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_BLINK_WEB_MUTABLE_STATE_IMPL_H_ | |
| 6 #define CC_BLINK_WEB_MUTABLE_STATE_IMPL_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 | |
| 10 #include "cc/blink/cc_blink_export.h" | |
| 11 | |
| 12 #include "third_party/WebKit/public/platform/WebMutableState.h" | |
| 13 | |
| 14 namespace cc { | |
| 15 class LayerImpl; | |
| 16 class LayerTreeImpl; | |
| 17 struct LayerTreeMutation; | |
| 18 typedef std::map<uint64_t, LayerTreeMutation> LayerTreeMutationMap; | |
| 19 } | |
| 20 | |
| 21 namespace cc_blink { | |
| 22 | |
| 23 class CC_BLINK_EXPORT WebMutableStateImpl : public blink::WebMutableState { | |
| 24 public: | |
| 25 WebMutableStateImpl(cc::LayerTreeMutation* mutation, | |
| 26 cc::LayerImpl* main_layer, | |
| 27 cc::LayerImpl* scroll_layer); | |
| 28 ~WebMutableStateImpl() override; | |
| 29 | |
| 30 double getOpacity() const override; | |
| 31 void setOpacity(double opacity) override; | |
| 32 | |
| 33 const SkMatrix44& getTransform() const override; | |
| 34 void setTransform(const SkMatrix44& transform) override; | |
| 35 | |
| 36 double getScrollLeft() const override; | |
| 37 void setScrollLeft(double scroll_left) override; | |
| 38 | |
| 39 double getScrollTop() const override; | |
| 40 void setScrollTop(double scroll_top) override; | |
| 41 | |
| 42 private: | |
| 43 cc::LayerTreeMutation* mutation_; | |
| 44 cc::LayerImpl* main_layer_; | |
| 45 cc::LayerImpl* scroll_layer_; | |
| 46 }; | |
| 47 | |
| 48 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.
| |
| 49 : public blink::WebMutableStateProvider { | |
| 50 public: | |
| 51 // TODO(vollick): after slimming paint v2, this will need to operate on | |
| 52 // 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.
| |
| 53 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.
| |
| 54 cc::LayerTreeMutationMap* mutations); | |
| 55 ~WebMutableStateProviderImpl() override; | |
| 56 | |
| 57 blink::WebMutableState* getMutableStateFor(uint64_t element_id) override; | |
| 58 | |
| 59 private: | |
| 60 cc::LayerTreeImpl* state_; | |
| 61 cc::LayerTreeMutationMap* mutations_; | |
| 62 }; | |
| 63 | |
| 64 } // namespace cc_blink | |
| 65 | |
| 66 #endif // CC_BLINK_WEB_MUTABLE_STATE_IMPL_H_ | |
| OLD | NEW |