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

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

Issue 146713002: Revert of Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest_scroll.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 }; 27 };
28 } // namespace BASE_HASH_NAMESPACE 28 } // namespace BASE_HASH_NAMESPACE
29 #endif // COMPILER 29 #endif // COMPILER
30 30
31 namespace cc { 31 namespace cc {
32 32
33 class ContextProvider; 33 class ContextProvider;
34 class DebugRectHistory; 34 class DebugRectHistory;
35 class FrameRateCounter; 35 class FrameRateCounter;
36 class HeadsUpDisplayLayerImpl; 36 class HeadsUpDisplayLayerImpl;
37 class LayerScrollOffsetDelegateProxy;
38 class LayerTreeDebugState; 37 class LayerTreeDebugState;
39 class LayerTreeHostImpl; 38 class LayerTreeHostImpl;
40 class LayerTreeImpl; 39 class LayerTreeImpl;
41 class LayerTreeSettings; 40 class LayerTreeSettings;
42 class MemoryHistory; 41 class MemoryHistory;
43 class OutputSurface; 42 class OutputSurface;
44 class PaintTimeCounter; 43 class PaintTimeCounter;
45 class Proxy; 44 class Proxy;
46 class ResourceProvider; 45 class ResourceProvider;
47 class TileManager; 46 class TileManager;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 int source_frame_number() const { return source_frame_number_; } 106 int source_frame_number() const { return source_frame_number_; }
108 void set_source_frame_number(int frame_number) { 107 void set_source_frame_number(int frame_number) {
109 source_frame_number_ = frame_number; 108 source_frame_number_ = frame_number;
110 } 109 }
111 110
112 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } 111 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; }
113 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { 112 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) {
114 hud_layer_ = layer_impl; 113 hud_layer_ = layer_impl;
115 } 114 }
116 115
117 LayerImpl* InnerViewportScrollLayer() const; 116 LayerImpl* RootScrollLayer() const;
118 // This function may return NULL, it is the caller's responsibility to check.
119 LayerImpl* OuterViewportScrollLayer() const;
120 gfx::Vector2dF TotalScrollOffset() const;
121 gfx::Vector2dF TotalMaxScrollOffset() const;
122 gfx::Vector2dF TotalScrollDelta() const;
123
124 LayerImpl* RootContainerLayer() const; 117 LayerImpl* RootContainerLayer() const;
125 LayerImpl* CurrentlyScrollingLayer() const; 118 LayerImpl* CurrentlyScrollingLayer() const;
126 void SetCurrentlyScrollingLayer(LayerImpl* layer); 119 void SetCurrentlyScrollingLayer(LayerImpl* layer);
127 void ClearCurrentlyScrollingLayer(); 120 void ClearCurrentlyScrollingLayer();
128 float VerticalAdjust(const LayerImpl* layer) const;
129 121
122 void FindRootScrollLayer();
123 void UpdateMaxScrollOffset();
130 void SetViewportLayersFromIds(int page_scale_layer_id, 124 void SetViewportLayersFromIds(int page_scale_layer_id,
131 int inner_viewport_scroll_layer_id, 125 int inner_viewport_scroll_layer_id,
132 int outer_viewport_scroll_layer_id); 126 int outer_viewport_scroll_layer_id);
133 void ClearViewportLayers(); 127 void ClearViewportLayers();
134 LayerImpl* page_scale_layer() { return page_scale_layer_; }
135 void ApplySentScrollAndScaleDeltasFromAbortedCommit(); 128 void ApplySentScrollAndScaleDeltasFromAbortedCommit();
136 void ApplyScrollDeltasSinceBeginMainFrame(); 129 void ApplyScrollDeltasSinceBeginMainFrame();
137 130
138 SkColor background_color() const { return background_color_; } 131 SkColor background_color() const { return background_color_; }
139 void set_background_color(SkColor color) { background_color_ = color; } 132 void set_background_color(SkColor color) { background_color_ = color; }
140 133
141 bool has_transparent_background() const { 134 bool has_transparent_background() const {
142 return has_transparent_background_; 135 return has_transparent_background_;
143 } 136 }
144 void set_has_transparent_background(bool transparent) { 137 void set_has_transparent_background(bool transparent) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // and the active tree's size is now out of date. 200 // and the active tree's size is now out of date.
208 bool ViewportSizeInvalid() const; 201 bool ViewportSizeInvalid() const;
209 void SetViewportSizeInvalid(); 202 void SetViewportSizeInvalid();
210 void ResetViewportSizeInvalid(); 203 void ResetViewportSizeInvalid();
211 204
212 // Useful for debug assertions, probably shouldn't be used for anything else. 205 // Useful for debug assertions, probably shouldn't be used for anything else.
213 Proxy* proxy() const; 206 Proxy* proxy() const;
214 207
215 void SetRootLayerScrollOffsetDelegate( 208 void SetRootLayerScrollOffsetDelegate(
216 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate); 209 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate);
217 void UpdateScrollOffsetDelegate();
218 gfx::Vector2dF GetDelegatedScrollOffset(LayerImpl* layer);
219 210
220 // Call this function when you expect there to be a swap buffer. 211 // Call this function when you expect there to be a swap buffer.
221 // See swap_promise.h for how to use SwapPromise. 212 // See swap_promise.h for how to use SwapPromise.
222 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); 213 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
223 214
224 // Take the |new_swap_promise| and append it to |swap_promise_list_|. 215 // Take the |new_swap_promise| and append it to |swap_promise_list_|.
225 void PassSwapPromises(ScopedPtrVector<SwapPromise>* new_swap_promise); 216 void PassSwapPromises(ScopedPtrVector<SwapPromise>* new_swap_promise);
226 void FinishSwapPromises(CompositorFrameMetadata* metadata); 217 void FinishSwapPromises(CompositorFrameMetadata* metadata);
227 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 218 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
228 219
229 void DidModifyTilePriorities(); 220 void DidModifyTilePriorities();
230 221
231 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; 222 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const;
232 void ProcessUIResourceRequestQueue(); 223 void ProcessUIResourceRequestQueue();
233 224
234 bool IsUIResourceOpaque(UIResourceId uid) const; 225 bool IsUIResourceOpaque(UIResourceId uid) const;
235 226
236 void AddLayerWithCopyOutputRequest(LayerImpl* layer); 227 void AddLayerWithCopyOutputRequest(LayerImpl* layer);
237 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer); 228 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer);
238 const std::vector<LayerImpl*>& LayersWithCopyOutputRequest() const; 229 const std::vector<LayerImpl*>& LayersWithCopyOutputRequest() const;
239 230
240 protected: 231 protected:
241 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); 232 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl);
242 233
234 void UpdateSolidColorScrollbars();
235
243 void UpdateRootScrollLayerSizeDelta(); 236 void UpdateRootScrollLayerSizeDelta();
244 237
245 LayerTreeHostImpl* layer_tree_host_impl_; 238 LayerTreeHostImpl* layer_tree_host_impl_;
246 int source_frame_number_; 239 int source_frame_number_;
247 scoped_ptr<LayerImpl> root_layer_; 240 scoped_ptr<LayerImpl> root_layer_;
248 HeadsUpDisplayLayerImpl* hud_layer_; 241 HeadsUpDisplayLayerImpl* hud_layer_;
242 LayerImpl* root_scroll_layer_;
249 LayerImpl* currently_scrolling_layer_; 243 LayerImpl* currently_scrolling_layer_;
250 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; 244 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
251 scoped_ptr<LayerScrollOffsetDelegateProxy>
252 inner_viewport_scroll_delegate_proxy_;
253 scoped_ptr<LayerScrollOffsetDelegateProxy>
254 outer_viewport_scroll_delegate_proxy_;
255 SkColor background_color_; 245 SkColor background_color_;
256 bool has_transparent_background_; 246 bool has_transparent_background_;
257 247
258 LayerImpl* page_scale_layer_; 248 LayerImpl* page_scale_layer_;
259 LayerImpl* inner_viewport_scroll_layer_; 249 LayerImpl* inner_viewport_scroll_layer_;
260 LayerImpl* outer_viewport_scroll_layer_; 250 LayerImpl* outer_viewport_scroll_layer_;
261 251
262 float page_scale_factor_; 252 float page_scale_factor_;
263 float page_scale_delta_; 253 float page_scale_delta_;
264 float sent_page_scale_delta_; 254 float sent_page_scale_delta_;
(...skipping 26 matching lines...) Expand all
291 281
292 UIResourceRequestQueue ui_resource_request_queue_; 282 UIResourceRequestQueue ui_resource_request_queue_;
293 283
294 private: 284 private:
295 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 285 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
296 }; 286 };
297 287
298 } // namespace cc 288 } // namespace cc
299 289
300 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 290 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_scroll.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698