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

Side by Side Diff: cc/layers/solid_color_scrollbar_layer.h

Issue 2397843003: cc/blimp: Add (de)-serialization for PictureLayer and ScrollbarLayer. (Closed)
Patch Set: Fix test Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ 5 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ 6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 10 matching lines...) Expand all
21 ScrollbarOrientation orientation, 21 ScrollbarOrientation orientation,
22 int thumb_thickness, 22 int thumb_thickness,
23 int track_start, 23 int track_start,
24 bool is_left_side_vertical_scrollbar, 24 bool is_left_side_vertical_scrollbar,
25 int scroll_layer_id); 25 int scroll_layer_id);
26 26
27 // Layer overrides. 27 // Layer overrides.
28 bool OpacityCanAnimateOnImplThread() const override; 28 bool OpacityCanAnimateOnImplThread() const override;
29 bool AlwaysUseActiveTreeOpacity() const override; 29 bool AlwaysUseActiveTreeOpacity() const override;
30 ScrollbarLayerInterface* ToScrollbarLayer() override; 30 ScrollbarLayerInterface* ToScrollbarLayer() override;
31 void ToLayerNodeProto(proto::LayerNode* proto) const override;
32 void FromLayerNodeProto(const proto::LayerNode& proto,
33 const LayerIdMap& layer_map,
34 LayerTreeHost* layer_tree_host) override;
31 35
32 void SetOpacity(float opacity) override; 36 void SetOpacity(float opacity) override;
33 void PushPropertiesTo(LayerImpl* layer) override; 37 void PushPropertiesTo(LayerImpl* layer) override;
34 38
35 void SetNeedsDisplayRect(const gfx::Rect& rect) override; 39 void SetNeedsDisplayRect(const gfx::Rect& rect) override;
36 40
37 // ScrollbarLayerInterface 41 // ScrollbarLayerInterface
38 int ScrollLayerId() const override; 42 int ScrollLayerId() const override;
39 void SetScrollLayer(int layer_id) override; 43 void SetScrollLayer(int layer_id) override;
40 44
41 ScrollbarOrientation orientation() const override; 45 ScrollbarOrientation orientation() const override;
42 46
43 protected: 47 protected:
44 SolidColorScrollbarLayer(ScrollbarOrientation orientation, 48 SolidColorScrollbarLayer(ScrollbarOrientation orientation,
45 int thumb_thickness, 49 int thumb_thickness,
46 int track_start, 50 int track_start,
47 bool is_left_side_vertical_scrollbar, 51 bool is_left_side_vertical_scrollbar,
48 int scroll_layer_id); 52 int scroll_layer_id);
53 SolidColorScrollbarLayer(int engine_layer_id,
vmpstr 2016/10/07 23:50:05 This definitely needs a comment. I also don't unde
Khushal 2016/10/08 00:41:33 Not needed anymore. \o/
54 ScrollbarOrientation orientation,
55 int thumb_thickness,
56 int track_start,
57 bool is_left_side_vertical_scrollbar,
58 int scroll_layer_id);
49 ~SolidColorScrollbarLayer() override; 59 ~SolidColorScrollbarLayer() override;
50 60
51 // Layer overrides for proto conversions. 61 // Layer overrides for proto conversions.
52 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; 62 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override;
53 void LayerSpecificPropertiesToProto(proto::LayerProperties* proto,
54 bool inputs_only) override;
55 void FromLayerSpecificPropertiesProto(
56 const proto::LayerProperties& proto) override;
57 63
58 private: 64 private:
59 friend class LayerSerializationTest; 65 friend class LayerSerializationTest;
60 66
61 // Encapsulate all data, callbacks, interfaces received from the embedder. 67 // Encapsulate all data, callbacks, interfaces received from the embedder.
62 struct SolidColorScrollbarLayerInputs { 68 struct SolidColorScrollbarLayerInputs {
63 SolidColorScrollbarLayerInputs(ScrollbarOrientation orientation, 69 SolidColorScrollbarLayerInputs(ScrollbarOrientation orientation,
64 int thumb_thickness, 70 int thumb_thickness,
65 int track_start, 71 int track_start,
66 bool is_left_side_vertical_scrollbar, 72 bool is_left_side_vertical_scrollbar,
67 int scroll_layer_id); 73 int scroll_layer_id);
68 ~SolidColorScrollbarLayerInputs(); 74 ~SolidColorScrollbarLayerInputs();
69 75
70 int scroll_layer_id; 76 int scroll_layer_id;
71 ScrollbarOrientation orientation; 77 ScrollbarOrientation orientation;
72 int thumb_thickness; 78 int thumb_thickness;
73 int track_start; 79 int track_start;
74 bool is_left_side_vertical_scrollbar; 80 bool is_left_side_vertical_scrollbar;
75 }; 81 };
76 82
77 SolidColorScrollbarLayerInputs solid_color_scrollbar_layer_inputs_; 83 SolidColorScrollbarLayerInputs solid_color_scrollbar_layer_inputs_;
78 84
79 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer); 85 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer);
80 }; 86 };
81 87
82 } // namespace cc 88 } // namespace cc
83 89
84 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ 90 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698