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

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

Issue 300323005: Route selection bounds updates through the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 6 years, 5 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.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 30 matching lines...) Expand all
41 class LayerTreeSettings; 41 class LayerTreeSettings;
42 class MemoryHistory; 42 class MemoryHistory;
43 class OutputSurface; 43 class OutputSurface;
44 class PaintTimeCounter; 44 class PaintTimeCounter;
45 class PictureLayerImpl; 45 class PictureLayerImpl;
46 class Proxy; 46 class Proxy;
47 class ResourceProvider; 47 class ResourceProvider;
48 class TileManager; 48 class TileManager;
49 class UIResourceRequest; 49 class UIResourceRequest;
50 struct RendererCapabilities; 50 struct RendererCapabilities;
51 struct SelectionHandle;
51 52
52 typedef std::list<UIResourceRequest> UIResourceRequestQueue; 53 typedef std::list<UIResourceRequest> UIResourceRequestQueue;
53 54
54 class CC_EXPORT LayerTreeImpl { 55 class CC_EXPORT LayerTreeImpl {
55 public: 56 public:
56 static scoped_ptr<LayerTreeImpl> create( 57 static scoped_ptr<LayerTreeImpl> create(
57 LayerTreeHostImpl* layer_tree_host_impl) { 58 LayerTreeHostImpl* layer_tree_host_impl) {
58 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); 59 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl));
59 } 60 }
60 virtual ~LayerTreeImpl(); 61 virtual ~LayerTreeImpl();
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 257 }
257 258
258 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint( 259 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint(
259 const gfx::PointF& screen_space_point); 260 const gfx::PointF& screen_space_point);
260 261
261 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point); 262 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point);
262 263
263 LayerImpl* FindLayerThatIsHitByPointInTouchHandlerRegion( 264 LayerImpl* FindLayerThatIsHitByPointInTouchHandlerRegion(
264 const gfx::PointF& screen_space_point); 265 const gfx::PointF& screen_space_point);
265 266
267 void RegisterSelection(const LayerSelectionBound& anchor,
268 const LayerSelectionBound& focus);
269
270 // Compute the current selection handle location and visbility with respect to
271 // the viewport.
272 void GetViewportSelection(ViewportSelectionBound* anchor,
273 ViewportSelectionBound* focus);
274
266 void RegisterPictureLayerImpl(PictureLayerImpl* layer); 275 void RegisterPictureLayerImpl(PictureLayerImpl* layer);
267 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); 276 void UnregisterPictureLayerImpl(PictureLayerImpl* layer);
268 277
269 protected: 278 protected:
270 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); 279 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl);
271 void ReleaseResourcesRecursive(LayerImpl* current); 280 void ReleaseResourcesRecursive(LayerImpl* current);
272 281
273 LayerTreeHostImpl* layer_tree_host_impl_; 282 LayerTreeHostImpl* layer_tree_host_impl_;
274 int source_frame_number_; 283 int source_frame_number_;
275 scoped_ptr<LayerImpl> root_layer_; 284 scoped_ptr<LayerImpl> root_layer_;
276 HeadsUpDisplayLayerImpl* hud_layer_; 285 HeadsUpDisplayLayerImpl* hud_layer_;
277 LayerImpl* currently_scrolling_layer_; 286 LayerImpl* currently_scrolling_layer_;
278 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; 287 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
279 scoped_ptr<LayerScrollOffsetDelegateProxy> 288 scoped_ptr<LayerScrollOffsetDelegateProxy>
280 inner_viewport_scroll_delegate_proxy_; 289 inner_viewport_scroll_delegate_proxy_;
281 scoped_ptr<LayerScrollOffsetDelegateProxy> 290 scoped_ptr<LayerScrollOffsetDelegateProxy>
282 outer_viewport_scroll_delegate_proxy_; 291 outer_viewport_scroll_delegate_proxy_;
283 SkColor background_color_; 292 SkColor background_color_;
284 bool has_transparent_background_; 293 bool has_transparent_background_;
285 294
286 LayerImpl* page_scale_layer_; 295 LayerImpl* page_scale_layer_;
287 LayerImpl* inner_viewport_scroll_layer_; 296 LayerImpl* inner_viewport_scroll_layer_;
288 LayerImpl* outer_viewport_scroll_layer_; 297 LayerImpl* outer_viewport_scroll_layer_;
289 298
299 LayerSelectionBound selection_anchor_;
300 LayerSelectionBound selection_focus_;
301
290 float page_scale_factor_; 302 float page_scale_factor_;
291 float page_scale_delta_; 303 float page_scale_delta_;
292 float sent_page_scale_delta_; 304 float sent_page_scale_delta_;
293 float min_page_scale_factor_; 305 float min_page_scale_factor_;
294 float max_page_scale_factor_; 306 float max_page_scale_factor_;
295 307
296 typedef base::hash_map<int, LayerImpl*> LayerIdMap; 308 typedef base::hash_map<int, LayerImpl*> LayerIdMap;
297 LayerIdMap layer_id_map_; 309 LayerIdMap layer_id_map_;
298 310
299 std::vector<LayerImpl*> layers_with_copy_output_request_; 311 std::vector<LayerImpl*> layers_with_copy_output_request_;
(...skipping 21 matching lines...) Expand all
321 333
322 int render_surface_layer_list_id_; 334 int render_surface_layer_list_id_;
323 335
324 private: 336 private:
325 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 337 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
326 }; 338 };
327 339
328 } // namespace cc 340 } // namespace cc
329 341
330 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 342 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698