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

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

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r248052. Created 6 years, 10 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_common_unittest.cc ('k') | cc/trees/layer_tree_host_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_HOST_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } 272 const LayerTreeImpl* active_tree() const { return active_tree_.get(); }
273 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } 273 LayerTreeImpl* pending_tree() { return pending_tree_.get(); }
274 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } 274 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); }
275 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } 275 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); }
276 virtual void CreatePendingTree(); 276 virtual void CreatePendingTree();
277 virtual void UpdateVisibleTiles(); 277 virtual void UpdateVisibleTiles();
278 virtual void ActivatePendingTree(); 278 virtual void ActivatePendingTree();
279 279
280 // Shortcuts to layers on the active tree. 280 // Shortcuts to layers on the active tree.
281 LayerImpl* RootLayer() const; 281 LayerImpl* RootLayer() const;
282 LayerImpl* RootScrollLayer() const; 282 LayerImpl* InnerViewportScrollLayer() const;
283 LayerImpl* OuterViewportScrollLayer() const;
283 LayerImpl* CurrentlyScrollingLayer() const; 284 LayerImpl* CurrentlyScrollingLayer() const;
284 285
285 int scroll_layer_id_when_mouse_over_scrollbar() { 286 int scroll_layer_id_when_mouse_over_scrollbar() {
286 return scroll_layer_id_when_mouse_over_scrollbar_; 287 return scroll_layer_id_when_mouse_over_scrollbar_;
287 } 288 }
288 289
289 bool IsCurrentlyScrolling() const; 290 bool IsCurrentlyScrolling() const;
290 291
291 virtual void SetVisible(bool visible); 292 virtual void SetVisible(bool visible);
292 bool visible() const { return visible_; } 293 bool visible() const { return visible_; }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 void CreateAndSetRenderer( 460 void CreateAndSetRenderer(
460 OutputSurface* output_surface, 461 OutputSurface* output_surface,
461 ResourceProvider* resource_provider, 462 ResourceProvider* resource_provider,
462 bool skip_gl_renderer); 463 bool skip_gl_renderer);
463 void CreateAndSetTileManager(ResourceProvider* resource_provider, 464 void CreateAndSetTileManager(ResourceProvider* resource_provider,
464 ContextProvider* context_provider, 465 ContextProvider* context_provider,
465 bool using_map_image); 466 bool using_map_image);
466 void ReleaseTreeResources(); 467 void ReleaseTreeResources();
467 void EnforceZeroBudget(bool zero_budget); 468 void EnforceZeroBudget(bool zero_budget);
468 469
470 void ScrollViewportBy(gfx::Vector2dF scroll_delta);
469 void AnimatePageScale(base::TimeTicks monotonic_time); 471 void AnimatePageScale(base::TimeTicks monotonic_time);
470 void AnimateScrollbars(base::TimeTicks monotonic_time); 472 void AnimateScrollbars(base::TimeTicks monotonic_time);
471 void AnimateTopControls(base::TimeTicks monotonic_time); 473 void AnimateTopControls(base::TimeTicks monotonic_time);
472 474
473 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( 475 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta(
474 LayerImpl* layer_impl, 476 LayerImpl* layer_impl,
475 float scale_from_viewport_to_screen_space, 477 float scale_from_viewport_to_screen_space,
476 const gfx::PointF& viewport_point, 478 const gfx::PointF& viewport_point,
477 const gfx::Vector2dF& viewport_delta); 479 const gfx::Vector2dF& viewport_delta);
478 480
479 void UpdateMaxScrollOffset();
480 void TrackDamageForAllSurfaces( 481 void TrackDamageForAllSurfaces(
481 LayerImpl* root_draw_layer, 482 LayerImpl* root_draw_layer,
482 const LayerImplList& render_surface_layer_list); 483 const LayerImplList& render_surface_layer_list);
483 484
484 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); 485 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy);
485 486
486 // This function should only be called from PrepareToDraw, as DidDrawAllLayers 487 // This function should only be called from PrepareToDraw, as DidDrawAllLayers
487 // must be called if this helper function is called. Returns DRAW_SUCCESS if 488 // must be called if this helper function is called. Returns DRAW_SUCCESS if
488 // the frame should be drawn. 489 // the frame should be drawn.
489 DrawSwapReadbackResult::DrawResult CalculateRenderPasses(FrameData* frame); 490 DrawSwapReadbackResult::DrawResult CalculateRenderPasses(FrameData* frame);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 int id_; 655 int id_;
655 656
656 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 657 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
657 658
658 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 659 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
659 }; 660 };
660 661
661 } // namespace cc 662 } // namespace cc
662 663
663 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 664 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698