OLD | NEW |
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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 367 |
368 int current_render_surface_list_id() const { | 368 int current_render_surface_list_id() const { |
369 return render_surface_layer_list_id_; | 369 return render_surface_layer_list_id_; |
370 } | 370 } |
371 | 371 |
372 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint( | 372 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint( |
373 const gfx::PointF& screen_space_point); | 373 const gfx::PointF& screen_space_point); |
374 | 374 |
375 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point); | 375 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point); |
376 | 376 |
377 LayerImpl* FindLayerWithWheelHandlerThatIsHitByPoint( | |
378 const gfx::PointF& screen_space_point); | |
379 | |
380 LayerImpl* FindLayerThatIsHitByPointInTouchHandlerRegion( | 377 LayerImpl* FindLayerThatIsHitByPointInTouchHandlerRegion( |
381 const gfx::PointF& screen_space_point); | 378 const gfx::PointF& screen_space_point); |
382 | 379 |
383 void RegisterSelection(const LayerSelection& selection); | 380 void RegisterSelection(const LayerSelection& selection); |
384 | 381 |
385 // Compute the current selection handle location and visbility with respect to | 382 // Compute the current selection handle location and visbility with respect to |
386 // the viewport. | 383 // the viewport. |
387 void GetViewportSelection(ViewportSelection* selection); | 384 void GetViewportSelection(ViewportSelection* selection); |
388 | 385 |
389 void set_top_controls_shrink_blink_size(bool shrink); | 386 void set_top_controls_shrink_blink_size(bool shrink); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 bool HasTransformAnimationThatInflatesBounds(const LayerImpl* layer) const; | 429 bool HasTransformAnimationThatInflatesBounds(const LayerImpl* layer) const; |
433 bool HasAnimationThatInflatesBounds(const LayerImpl* layer) const; | 430 bool HasAnimationThatInflatesBounds(const LayerImpl* layer) const; |
434 | 431 |
435 bool FilterAnimationBoundsForBox(const LayerImpl* layer, | 432 bool FilterAnimationBoundsForBox(const LayerImpl* layer, |
436 const gfx::BoxF& box, | 433 const gfx::BoxF& box, |
437 gfx::BoxF* bounds) const; | 434 gfx::BoxF* bounds) const; |
438 bool TransformAnimationBoundsForBox(const LayerImpl* layer, | 435 bool TransformAnimationBoundsForBox(const LayerImpl* layer, |
439 const gfx::BoxF& box, | 436 const gfx::BoxF& box, |
440 gfx::BoxF* bounds) const; | 437 gfx::BoxF* bounds) const; |
441 | 438 |
| 439 bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; } |
| 440 void set_have_wheel_event_handlers(bool have_event_handlers) { |
| 441 have_wheel_event_handlers_ = have_event_handlers; |
| 442 } |
| 443 |
442 protected: | 444 protected: |
443 explicit LayerTreeImpl( | 445 explicit LayerTreeImpl( |
444 LayerTreeHostImpl* layer_tree_host_impl, | 446 LayerTreeHostImpl* layer_tree_host_impl, |
445 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, | 447 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, |
446 scoped_refptr<SyncedTopControls> top_controls_shown_ratio, | 448 scoped_refptr<SyncedTopControls> top_controls_shown_ratio, |
447 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll); | 449 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll); |
448 float ClampPageScaleFactorToLimits(float page_scale_factor) const; | 450 float ClampPageScaleFactorToLimits(float page_scale_factor) const; |
449 void PushPageScaleFactorAndLimits(const float* page_scale_factor, | 451 void PushPageScaleFactorAndLimits(const float* page_scale_factor, |
450 float min_page_scale_factor, | 452 float min_page_scale_factor, |
451 float max_page_scale_factor); | 453 float max_page_scale_factor); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 | 521 |
520 bool has_ever_been_drawn_; | 522 bool has_ever_been_drawn_; |
521 | 523 |
522 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_; | 524 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_; |
523 std::vector<scoped_ptr<SwapPromise>> pinned_swap_promise_list_; | 525 std::vector<scoped_ptr<SwapPromise>> pinned_swap_promise_list_; |
524 | 526 |
525 UIResourceRequestQueue ui_resource_request_queue_; | 527 UIResourceRequestQueue ui_resource_request_queue_; |
526 | 528 |
527 int render_surface_layer_list_id_; | 529 int render_surface_layer_list_id_; |
528 | 530 |
| 531 bool have_wheel_event_handlers_; |
| 532 |
529 // Whether or not Blink's viewport size was shrunk by the height of the top | 533 // Whether or not Blink's viewport size was shrunk by the height of the top |
530 // controls at the time of the last layout. | 534 // controls at the time of the last layout. |
531 bool top_controls_shrink_blink_size_; | 535 bool top_controls_shrink_blink_size_; |
532 | |
533 float top_controls_height_; | 536 float top_controls_height_; |
534 | 537 |
535 // The amount that the top controls are shown from 0 (hidden) to 1 (fully | 538 // The amount that the top controls are shown from 0 (hidden) to 1 (fully |
536 // shown). | 539 // shown). |
537 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_; | 540 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_; |
538 | 541 |
539 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 542 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
540 | 543 |
541 private: | 544 private: |
542 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 545 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
543 }; | 546 }; |
544 | 547 |
545 } // namespace cc | 548 } // namespace cc |
546 | 549 |
547 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 550 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |