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

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

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Draft for review. Created 7 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 | Annotate | Revision Log
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 <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 14 matching lines...) Expand all
25 }; 25 };
26 } // namespace BASE_HASH_NAMESPACE 26 } // namespace BASE_HASH_NAMESPACE
27 #endif // COMPILER 27 #endif // COMPILER
28 28
29 namespace cc { 29 namespace cc {
30 30
31 class ContextProvider; 31 class ContextProvider;
32 class DebugRectHistory; 32 class DebugRectHistory;
33 class FrameRateCounter; 33 class FrameRateCounter;
34 class HeadsUpDisplayLayerImpl; 34 class HeadsUpDisplayLayerImpl;
35 class LayerScrollOffsetDelegateProxy;
35 class LayerTreeDebugState; 36 class LayerTreeDebugState;
36 class LayerTreeHostImpl; 37 class LayerTreeHostImpl;
37 class LayerTreeImpl; 38 class LayerTreeImpl;
38 class LayerTreeSettings; 39 class LayerTreeSettings;
39 class MemoryHistory; 40 class MemoryHistory;
40 class OutputSurface; 41 class OutputSurface;
41 class PaintTimeCounter; 42 class PaintTimeCounter;
42 class Proxy; 43 class Proxy;
43 class ResourceProvider; 44 class ResourceProvider;
44 class TileManager; 45 class TileManager;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 int source_frame_number() const { return source_frame_number_; } 104 int source_frame_number() const { return source_frame_number_; }
104 void set_source_frame_number(int frame_number) { 105 void set_source_frame_number(int frame_number) {
105 source_frame_number_ = frame_number; 106 source_frame_number_ = frame_number;
106 } 107 }
107 108
108 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } 109 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; }
109 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { 110 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) {
110 hud_layer_ = layer_impl; 111 hud_layer_ = layer_impl;
111 } 112 }
112 113
113 LayerImpl* RootScrollLayer() const; 114 LayerImpl* InnerViewportScrollLayer() const;
115 // This function may return NULL, it is the caller's responsibility to check.
116 LayerImpl* OuterViewportScrollLayer() const;
117 gfx::Vector2dF TotalScrollOffset() const;
118 gfx::Vector2dF TotalMaxScrollOffset() const;
119 gfx::Vector2dF TotalScrollDelta() const;
120
114 LayerImpl* RootContainerLayer() const; 121 LayerImpl* RootContainerLayer() const;
115 LayerImpl* CurrentlyScrollingLayer() const; 122 LayerImpl* CurrentlyScrollingLayer() const;
116 void SetCurrentlyScrollingLayer(LayerImpl* layer); 123 void SetCurrentlyScrollingLayer(LayerImpl* layer);
117 void ClearCurrentlyScrollingLayer(); 124 void ClearCurrentlyScrollingLayer();
118 125
119 void FindRootScrollLayer();
120 void UpdateMaxScrollOffset();
121 void SetViewportLayersFromIds(int page_scale_layer_id, 126 void SetViewportLayersFromIds(int page_scale_layer_id,
122 int inner_viewport_scroll_layer_id, 127 int inner_viewport_scroll_layer_id,
123 int outer_viewport_scroll_layer_id); 128 int outer_viewport_scroll_layer_id);
124 void ClearViewportLayers(); 129 void ClearViewportLayers();
130 LayerImpl* page_scale_layer() { return page_scale_layer_; }
125 void ApplySentScrollAndScaleDeltasFromAbortedCommit(); 131 void ApplySentScrollAndScaleDeltasFromAbortedCommit();
126 void ApplyScrollDeltasSinceBeginMainFrame(); 132 void ApplyScrollDeltasSinceBeginMainFrame();
127 133
128 SkColor background_color() const { return background_color_; } 134 SkColor background_color() const { return background_color_; }
129 void set_background_color(SkColor color) { background_color_ = color; } 135 void set_background_color(SkColor color) { background_color_ = color; }
130 136
131 bool has_transparent_background() const { 137 bool has_transparent_background() const {
132 return has_transparent_background_; 138 return has_transparent_background_;
133 } 139 }
134 void set_has_transparent_background(bool transparent) { 140 void set_has_transparent_background(bool transparent) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // and the active tree's size is now out of date. 203 // and the active tree's size is now out of date.
198 bool ViewportSizeInvalid() const; 204 bool ViewportSizeInvalid() const;
199 void SetViewportSizeInvalid(); 205 void SetViewportSizeInvalid();
200 void ResetViewportSizeInvalid(); 206 void ResetViewportSizeInvalid();
201 207
202 // Useful for debug assertions, probably shouldn't be used for anything else. 208 // Useful for debug assertions, probably shouldn't be used for anything else.
203 Proxy* proxy() const; 209 Proxy* proxy() const;
204 210
205 void SetRootLayerScrollOffsetDelegate( 211 void SetRootLayerScrollOffsetDelegate(
206 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate); 212 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate);
213 void UpdateScrollOffsetDelegate();
214 gfx::Vector2dF GetDelegatedScrollOffset(LayerImpl* layer);
207 215
208 void SetLatencyInfo(const ui::LatencyInfo& latency_info); 216 void SetLatencyInfo(const ui::LatencyInfo& latency_info);
209 const ui::LatencyInfo& GetLatencyInfo(); 217 const ui::LatencyInfo& GetLatencyInfo();
210 void ClearLatencyInfo(); 218 void ClearLatencyInfo();
211 219
212 void DidModifyTilePriorities(); 220 void DidModifyTilePriorities();
213 221
214 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; 222 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const;
215 void ProcessUIResourceRequestQueue(); 223 void ProcessUIResourceRequestQueue();
216 224
217 bool IsUIResourceOpaque(UIResourceId uid) const; 225 bool IsUIResourceOpaque(UIResourceId uid) const;
218 226
219 void AddLayerWithCopyOutputRequest(LayerImpl* layer); 227 void AddLayerWithCopyOutputRequest(LayerImpl* layer);
220 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer); 228 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer);
221 const std::vector<LayerImpl*> LayersWithCopyOutputRequest() const; 229 const std::vector<LayerImpl*> LayersWithCopyOutputRequest() const;
222 230
223 protected: 231 protected:
224 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); 232 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl);
225 233
226 void UpdateSolidColorScrollbars();
227
228 void UpdateRootScrollLayerSizeDelta(); 234 void UpdateRootScrollLayerSizeDelta();
229 235
230 LayerTreeHostImpl* layer_tree_host_impl_; 236 LayerTreeHostImpl* layer_tree_host_impl_;
231 int source_frame_number_; 237 int source_frame_number_;
232 scoped_ptr<LayerImpl> root_layer_; 238 scoped_ptr<LayerImpl> root_layer_;
233 HeadsUpDisplayLayerImpl* hud_layer_; 239 HeadsUpDisplayLayerImpl* hud_layer_;
234 LayerImpl* root_scroll_layer_;
235 LayerImpl* currently_scrolling_layer_; 240 LayerImpl* currently_scrolling_layer_;
236 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; 241 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
242 scoped_ptr<LayerScrollOffsetDelegateProxy>
243 inner_viewport_scroll_delegate_proxy_;
244 scoped_ptr<LayerScrollOffsetDelegateProxy>
245 outer_viewport_scroll_delegate_proxy_;
237 SkColor background_color_; 246 SkColor background_color_;
238 bool has_transparent_background_; 247 bool has_transparent_background_;
239 248
240 LayerImpl* page_scale_layer_; 249 LayerImpl* page_scale_layer_;
241 LayerImpl* inner_viewport_scroll_layer_; 250 LayerImpl* inner_viewport_scroll_layer_;
242 LayerImpl* outer_viewport_scroll_layer_; 251 LayerImpl* outer_viewport_scroll_layer_;
243 252
244 float page_scale_factor_; 253 float page_scale_factor_;
245 float page_scale_delta_; 254 float page_scale_delta_;
246 float sent_page_scale_delta_; 255 float sent_page_scale_delta_;
(...skipping 26 matching lines...) Expand all
273 282
274 UIResourceRequestQueue ui_resource_request_queue_; 283 UIResourceRequestQueue ui_resource_request_queue_;
275 284
276 private: 285 private:
277 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 286 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
278 }; 287 };
279 288
280 } // namespace cc 289 } // namespace cc
281 290
282 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 291 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698