OLD | NEW |
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_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
| 10 #include <utility> |
| 11 #include <vector> |
10 | 12 |
11 #include "base/logging.h" | 13 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
13 #include "base/values.h" | 15 #include "base/values.h" |
14 #include "cc/animation/animation_delegate.h" | 16 #include "cc/animation/animation_delegate.h" |
15 #include "cc/animation/layer_animation_controller.h" | 17 #include "cc/animation/layer_animation_controller.h" |
16 #include "cc/animation/layer_animation_value_observer.h" | 18 #include "cc/animation/layer_animation_value_observer.h" |
17 #include "cc/animation/layer_animation_value_provider.h" | 19 #include "cc/animation/layer_animation_value_provider.h" |
18 #include "cc/base/cc_export.h" | 20 #include "cc/base/cc_export.h" |
19 #include "cc/base/region.h" | 21 #include "cc/base/region.h" |
20 #include "cc/base/scoped_ptr_vector.h" | 22 #include "cc/base/scoped_ptr_vector.h" |
21 #include "cc/input/input_handler.h" | 23 #include "cc/input/input_handler.h" |
22 #include "cc/layers/draw_properties.h" | 24 #include "cc/layers/draw_properties.h" |
23 #include "cc/layers/layer_lists.h" | 25 #include "cc/layers/layer_lists.h" |
24 #include "cc/layers/layer_position_constraint.h" | 26 #include "cc/layers/layer_position_constraint.h" |
25 #include "cc/layers/render_surface_impl.h" | 27 #include "cc/layers/render_surface_impl.h" |
26 #include "cc/output/filter_operations.h" | 28 #include "cc/output/filter_operations.h" |
27 #include "cc/quads/shared_quad_state.h" | 29 #include "cc/quads/shared_quad_state.h" |
28 #include "cc/resources/resource_provider.h" | 30 #include "cc/resources/resource_provider.h" |
| 31 #include "cc/trees/layer_tree_host_common.h" |
29 #include "skia/ext/refptr.h" | 32 #include "skia/ext/refptr.h" |
30 #include "third_party/skia/include/core/SkColor.h" | 33 #include "third_party/skia/include/core/SkColor.h" |
31 #include "third_party/skia/include/core/SkImageFilter.h" | 34 #include "third_party/skia/include/core/SkImageFilter.h" |
32 #include "third_party/skia/include/core/SkPicture.h" | 35 #include "third_party/skia/include/core/SkPicture.h" |
33 #include "ui/gfx/point3_f.h" | 36 #include "ui/gfx/point3_f.h" |
34 #include "ui/gfx/rect.h" | 37 #include "ui/gfx/rect.h" |
35 #include "ui/gfx/rect_f.h" | 38 #include "ui/gfx/rect_f.h" |
36 #include "ui/gfx/transform.h" | 39 #include "ui/gfx/transform.h" |
37 | 40 |
38 namespace base { | 41 namespace base { |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 return non_fast_scrollable_region_; | 440 return non_fast_scrollable_region_; |
438 } | 441 } |
439 | 442 |
440 void SetTouchEventHandlerRegion(const Region& region) { | 443 void SetTouchEventHandlerRegion(const Region& region) { |
441 touch_event_handler_region_ = region; | 444 touch_event_handler_region_ = region; |
442 } | 445 } |
443 const Region& touch_event_handler_region() const { | 446 const Region& touch_event_handler_region() const { |
444 return touch_event_handler_region_; | 447 return touch_event_handler_region_; |
445 } | 448 } |
446 | 449 |
| 450 void SetSmoothnessTimingRequests(const SmoothnessTimingRequestsType& rects) { |
| 451 smoothness_timing_requests_ = rects; |
| 452 } |
| 453 const SmoothnessTimingRequestsType& smoothness_timing_requests() const { |
| 454 return smoothness_timing_requests_; |
| 455 } |
| 456 |
447 void SetDrawCheckerboardForMissingTiles(bool checkerboard) { | 457 void SetDrawCheckerboardForMissingTiles(bool checkerboard) { |
448 draw_checkerboard_for_missing_tiles_ = checkerboard; | 458 draw_checkerboard_for_missing_tiles_ = checkerboard; |
449 } | 459 } |
450 bool draw_checkerboard_for_missing_tiles() const { | 460 bool draw_checkerboard_for_missing_tiles() const { |
451 return draw_checkerboard_for_missing_tiles_; | 461 return draw_checkerboard_for_missing_tiles_; |
452 } | 462 } |
453 | 463 |
454 InputHandler::ScrollStatus TryScroll( | 464 InputHandler::ScrollStatus TryScroll( |
455 const gfx::PointF& screen_space_point, | 465 const gfx::PointF& screen_space_point, |
456 InputHandler::ScrollInputType type) const; | 466 InputHandler::ScrollInputType type) const; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 bool hide_layer_and_subtree_ : 1; | 642 bool hide_layer_and_subtree_ : 1; |
633 bool force_render_surface_ : 1; | 643 bool force_render_surface_ : 1; |
634 | 644 |
635 // Cache transform_'s invertibility. | 645 // Cache transform_'s invertibility. |
636 bool transform_is_invertible_ : 1; | 646 bool transform_is_invertible_ : 1; |
637 | 647 |
638 // Set for the layer that other layers are fixed to. | 648 // Set for the layer that other layers are fixed to. |
639 bool is_container_for_fixed_position_layers_ : 1; | 649 bool is_container_for_fixed_position_layers_ : 1; |
640 Region non_fast_scrollable_region_; | 650 Region non_fast_scrollable_region_; |
641 Region touch_event_handler_region_; | 651 Region touch_event_handler_region_; |
| 652 SmoothnessTimingRequestsType smoothness_timing_requests_; |
642 SkColor background_color_; | 653 SkColor background_color_; |
643 | 654 |
644 float opacity_; | 655 float opacity_; |
645 SkXfermode::Mode blend_mode_; | 656 SkXfermode::Mode blend_mode_; |
646 gfx::PointF position_; | 657 gfx::PointF position_; |
647 gfx::Transform transform_; | 658 gfx::Transform transform_; |
648 | 659 |
649 LayerPositionConstraint position_constraint_; | 660 LayerPositionConstraint position_constraint_; |
650 | 661 |
651 gfx::Vector2dF scroll_delta_; | 662 gfx::Vector2dF scroll_delta_; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 DrawProperties<LayerImpl> draw_properties_; | 715 DrawProperties<LayerImpl> draw_properties_; |
705 | 716 |
706 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 717 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
707 | 718 |
708 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 719 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
709 }; | 720 }; |
710 | 721 |
711 } // namespace cc | 722 } // namespace cc |
712 | 723 |
713 #endif // CC_LAYERS_LAYER_IMPL_H_ | 724 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |