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

Side by Side Diff: cc/layer_tree_impl.h

Issue 11550035: Implement pinch-zoom scaling for main-frame scrollbars and pinch-zoom overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix impl-side painting issues. Created 7 years, 9 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
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_LAYER_TREE_IMPL_H_ 5 #ifndef CC_LAYER_TREE_IMPL_H_
6 #define CC_LAYER_TREE_IMPL_H_ 6 #define CC_LAYER_TREE_IMPL_H_
7 7
8 #include "base/hash_tables.h" 8 #include "base/hash_tables.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 16 matching lines...) Expand all
27 class HeadsUpDisplayLayerImpl; 27 class HeadsUpDisplayLayerImpl;
28 class LayerTreeDebugState; 28 class LayerTreeDebugState;
29 class LayerTreeHostImpl; 29 class LayerTreeHostImpl;
30 class LayerTreeImpl; 30 class LayerTreeImpl;
31 class LayerTreeSettings; 31 class LayerTreeSettings;
32 class MemoryHistory; 32 class MemoryHistory;
33 class OutputSurface; 33 class OutputSurface;
34 class PaintTimeCounter; 34 class PaintTimeCounter;
35 class Proxy; 35 class Proxy;
36 class ResourceProvider; 36 class ResourceProvider;
37 class ScrollbarLayerImpl;
37 class TileManager; 38 class TileManager;
38 struct RendererCapabilities; 39 struct RendererCapabilities;
39 40
40 class CC_EXPORT LayerTreeImpl { 41 class CC_EXPORT LayerTreeImpl {
41 public: 42 public:
42 typedef std::vector<LayerImpl*> LayerList; 43 typedef std::vector<LayerImpl*> LayerList;
43 44
44 static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_imp l) 45 static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_imp l)
45 { 46 {
46 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); 47 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl));
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 184
184 // Set on the active tree when the viewport size recently changed 185 // Set on the active tree when the viewport size recently changed
185 // and the active tree's size is now out of date. 186 // and the active tree's size is now out of date.
186 bool ViewportSizeInvalid() const; 187 bool ViewportSizeInvalid() const;
187 void SetViewportSizeInvalid(); 188 void SetViewportSizeInvalid();
188 void ResetViewportSizeInvalid(); 189 void ResetViewportSizeInvalid();
189 190
190 // Useful for debug assertions, probably shouldn't be used for anything else. 191 // Useful for debug assertions, probably shouldn't be used for anything else.
191 Proxy* proxy() const; 192 Proxy* proxy() const;
192 193
194 void SetPinchZoomHorizontalLayerId(int layer_id);
195 ScrollbarLayerImpl* PinchZoomScrollbarHorizontal();
196 void SetPinchZoomVerticalLayerId(int layer_id);
197 ScrollbarLayerImpl* PinchZoomScrollbarVertical();
198
199 void UpdatePinchZoomScrollbarsIfNeeded();
200 void SetPinchZoomScrollbarsVisibility();
201
202 bool HasPinchZoomScrollbars() {
203 return pinch_zoom_scrollbar_horizontal_layer_id &&
204 pinch_zoom_scrollbar_vertical_layer_id;
205 }
206
193 protected: 207 protected:
194 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); 208 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl);
195 209
196 LayerTreeHostImpl* layer_tree_host_impl_; 210 LayerTreeHostImpl* layer_tree_host_impl_;
197 int source_frame_number_; 211 int source_frame_number_;
198 scoped_ptr<LayerImpl> root_layer_; 212 scoped_ptr<LayerImpl> root_layer_;
199 HeadsUpDisplayLayerImpl* hud_layer_; 213 HeadsUpDisplayLayerImpl* hud_layer_;
200 LayerImpl* root_scroll_layer_; 214 LayerImpl* root_scroll_layer_;
201 LayerImpl* currently_scrolling_layer_; 215 LayerImpl* currently_scrolling_layer_;
202 SkColor background_color_; 216 SkColor background_color_;
203 bool has_transparent_background_; 217 bool has_transparent_background_;
204 218
219 int pinch_zoom_scrollbar_horizontal_layer_id;
220 int pinch_zoom_scrollbar_vertical_layer_id;
221
205 float page_scale_factor_; 222 float page_scale_factor_;
206 float page_scale_delta_; 223 float page_scale_delta_;
207 float sent_page_scale_delta_; 224 float sent_page_scale_delta_;
208 float min_page_scale_factor_; 225 float min_page_scale_factor_;
209 float max_page_scale_factor_; 226 float max_page_scale_factor_;
210 227
211 typedef base::hash_map<int, LayerImpl*> LayerIdMap; 228 typedef base::hash_map<int, LayerImpl*> LayerIdMap;
212 LayerIdMap layer_id_map_; 229 LayerIdMap layer_id_map_;
213 230
214 // Persisted state for non-impl-side-painting. 231 // Persisted state for non-impl-side-painting.
(...skipping 10 matching lines...) Expand all
225 // In impl-side painting mode, this is true when the tree may contain 242 // In impl-side painting mode, this is true when the tree may contain
226 // structural differences relative to the active tree. 243 // structural differences relative to the active tree.
227 bool needs_full_tree_sync_; 244 bool needs_full_tree_sync_;
228 245
229 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 246 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
230 }; 247 };
231 248
232 } 249 }
233 250
234 #endif // CC_LAYER_TREE_IMPL_H_ 251 #endif // CC_LAYER_TREE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698