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

Side by Side Diff: cc/trees/layer_tree_impl.h

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: Addressed comments Created 4 years, 1 month 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_TREES_LAYER_TREE_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_
6 #define CC_TREES_LAYER_TREE_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class LayerTreeSettings; 44 class LayerTreeSettings;
45 class MemoryHistory; 45 class MemoryHistory;
46 class PageScaleAnimation; 46 class PageScaleAnimation;
47 class PictureLayerImpl; 47 class PictureLayerImpl;
48 class TaskRunnerProvider; 48 class TaskRunnerProvider;
49 class ResourceProvider; 49 class ResourceProvider;
50 class TileManager; 50 class TileManager;
51 class UIResourceRequest; 51 class UIResourceRequest;
52 class VideoFrameControllerClient; 52 class VideoFrameControllerClient;
53 struct PendingPageScaleAnimation; 53 struct PendingPageScaleAnimation;
54 struct ReflectedMainFrameState;
54 55
55 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; 56 typedef std::vector<UIResourceRequest> UIResourceRequestQueue;
56 typedef SyncedProperty<AdditionGroup<float>> SyncedTopControls; 57 typedef SyncedProperty<AdditionGroup<float>> SyncedTopControls;
57 typedef SyncedProperty<AdditionGroup<gfx::Vector2dF>> SyncedElasticOverscroll; 58 typedef SyncedProperty<AdditionGroup<gfx::Vector2dF>> SyncedElasticOverscroll;
58 59
59 class CC_EXPORT LayerTreeImpl { 60 class CC_EXPORT LayerTreeImpl {
60 public: 61 public:
61 // This is the number of times a fixed point has to be hit contiuously by a 62 // This is the number of times a fixed point has to be hit contiuously by a
62 // layer to consider it as jittering. 63 // layer to consider it as jittering.
63 enum : int { kFixedPointHitsThreshold = 3 }; 64 enum : int { kFixedPointHitsThreshold = 3 };
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 153
153 int source_frame_number() const { return source_frame_number_; } 154 int source_frame_number() const { return source_frame_number_; }
154 void set_source_frame_number(int frame_number) { 155 void set_source_frame_number(int frame_number) {
155 source_frame_number_ = frame_number; 156 source_frame_number_ = frame_number;
156 } 157 }
157 158
158 bool is_first_frame_after_commit() const { 159 bool is_first_frame_after_commit() const {
159 return source_frame_number_ != is_first_frame_after_commit_tracker_; 160 return source_frame_number_ != is_first_frame_after_commit_tracker_;
160 } 161 }
161 162
163 void SetReflectedMainFrameState(
164 std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state);
165 void ApplyReflectedMainFrameState();
166
162 void set_is_first_frame_after_commit(bool is_first_frame_after_commit) { 167 void set_is_first_frame_after_commit(bool is_first_frame_after_commit) {
163 is_first_frame_after_commit_tracker_ = 168 is_first_frame_after_commit_tracker_ =
164 is_first_frame_after_commit ? -1 : source_frame_number_; 169 is_first_frame_after_commit ? -1 : source_frame_number_;
165 } 170 }
166 171
167 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } 172 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; }
168 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { 173 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) {
169 hud_layer_ = layer_impl; 174 hud_layer_ = layer_impl;
170 } 175 }
171 176
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 bool top_controls_shrink_blink_size_; 560 bool top_controls_shrink_blink_size_;
556 float top_controls_height_; 561 float top_controls_height_;
557 float bottom_controls_height_; 562 float bottom_controls_height_;
558 563
559 // The amount that the top controls are shown from 0 (hidden) to 1 (fully 564 // The amount that the top controls are shown from 0 (hidden) to 1 (fully
560 // shown). 565 // shown).
561 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_; 566 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_;
562 567
563 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 568 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
564 569
570 std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state_;
571
565 private: 572 private:
566 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 573 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
567 }; 574 };
568 575
569 } // namespace cc 576 } // namespace cc
570 577
571 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 578 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698