OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_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/callback.h" | 13 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
13 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
14 #include "cc/animation/layer_animation_controller.h" | 16 #include "cc/animation/layer_animation_controller.h" |
15 #include "cc/animation/layer_animation_value_observer.h" | 17 #include "cc/animation/layer_animation_value_observer.h" |
16 #include "cc/animation/layer_animation_value_provider.h" | 18 #include "cc/animation/layer_animation_value_provider.h" |
17 #include "cc/base/cc_export.h" | 19 #include "cc/base/cc_export.h" |
18 #include "cc/base/region.h" | 20 #include "cc/base/region.h" |
19 #include "cc/base/scoped_ptr_vector.h" | 21 #include "cc/base/scoped_ptr_vector.h" |
20 #include "cc/debug/micro_benchmark.h" | 22 #include "cc/debug/micro_benchmark.h" |
21 #include "cc/layers/draw_properties.h" | 23 #include "cc/layers/draw_properties.h" |
22 #include "cc/layers/layer_lists.h" | 24 #include "cc/layers/layer_lists.h" |
23 #include "cc/layers/layer_position_constraint.h" | 25 #include "cc/layers/layer_position_constraint.h" |
24 #include "cc/layers/paint_properties.h" | 26 #include "cc/layers/paint_properties.h" |
25 #include "cc/layers/render_surface.h" | 27 #include "cc/layers/render_surface.h" |
26 #include "cc/output/filter_operations.h" | 28 #include "cc/output/filter_operations.h" |
| 29 #include "cc/trees/layer_tree_host_impl.h" |
27 #include "skia/ext/refptr.h" | 30 #include "skia/ext/refptr.h" |
28 #include "third_party/skia/include/core/SkColor.h" | 31 #include "third_party/skia/include/core/SkColor.h" |
29 #include "third_party/skia/include/core/SkImageFilter.h" | 32 #include "third_party/skia/include/core/SkImageFilter.h" |
30 #include "third_party/skia/include/core/SkPicture.h" | 33 #include "third_party/skia/include/core/SkPicture.h" |
31 #include "third_party/skia/include/core/SkXfermode.h" | 34 #include "third_party/skia/include/core/SkXfermode.h" |
32 #include "ui/gfx/point3_f.h" | 35 #include "ui/gfx/point3_f.h" |
33 #include "ui/gfx/rect.h" | 36 #include "ui/gfx/rect.h" |
34 #include "ui/gfx/rect_f.h" | 37 #include "ui/gfx/rect_f.h" |
35 #include "ui/gfx/transform.h" | 38 #include "ui/gfx/transform.h" |
36 | 39 |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region); | 293 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region); |
291 const Region& non_fast_scrollable_region() const { | 294 const Region& non_fast_scrollable_region() const { |
292 return non_fast_scrollable_region_; | 295 return non_fast_scrollable_region_; |
293 } | 296 } |
294 | 297 |
295 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); | 298 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); |
296 const Region& touch_event_handler_region() const { | 299 const Region& touch_event_handler_region() const { |
297 return touch_event_handler_region_; | 300 return touch_event_handler_region_; |
298 } | 301 } |
299 | 302 |
| 303 void SetSmoothnessTimingRequests(const SmoothnessTimingRequestsType& rects); |
| 304 const SmoothnessTimingRequestsType& smoothness_timing_requests() const { |
| 305 return smoothness_timing_requests_; |
| 306 } |
| 307 |
300 void set_did_scroll_callback(const base::Closure& callback) { | 308 void set_did_scroll_callback(const base::Closure& callback) { |
301 did_scroll_callback_ = callback; | 309 did_scroll_callback_ = callback; |
302 } | 310 } |
303 | 311 |
304 void SetDrawCheckerboardForMissingTiles(bool checkerboard); | 312 void SetDrawCheckerboardForMissingTiles(bool checkerboard); |
305 bool draw_checkerboard_for_missing_tiles() const { | 313 bool draw_checkerboard_for_missing_tiles() const { |
306 return draw_checkerboard_for_missing_tiles_; | 314 return draw_checkerboard_for_missing_tiles_; |
307 } | 315 } |
308 | 316 |
309 void SetForceRenderSurface(bool force_render_surface); | 317 void SetForceRenderSurface(bool force_render_surface); |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 bool masks_to_bounds_ : 1; | 611 bool masks_to_bounds_ : 1; |
604 bool contents_opaque_ : 1; | 612 bool contents_opaque_ : 1; |
605 bool double_sided_ : 1; | 613 bool double_sided_ : 1; |
606 bool should_flatten_transform_ : 1; | 614 bool should_flatten_transform_ : 1; |
607 bool use_parent_backface_visibility_ : 1; | 615 bool use_parent_backface_visibility_ : 1; |
608 bool draw_checkerboard_for_missing_tiles_ : 1; | 616 bool draw_checkerboard_for_missing_tiles_ : 1; |
609 bool force_render_surface_ : 1; | 617 bool force_render_surface_ : 1; |
610 bool transform_is_invertible_ : 1; | 618 bool transform_is_invertible_ : 1; |
611 Region non_fast_scrollable_region_; | 619 Region non_fast_scrollable_region_; |
612 Region touch_event_handler_region_; | 620 Region touch_event_handler_region_; |
| 621 SmoothnessTimingRequestsType smoothness_timing_requests_; |
613 gfx::PointF position_; | 622 gfx::PointF position_; |
614 SkColor background_color_; | 623 SkColor background_color_; |
615 float opacity_; | 624 float opacity_; |
616 SkXfermode::Mode blend_mode_; | 625 SkXfermode::Mode blend_mode_; |
617 FilterOperations filters_; | 626 FilterOperations filters_; |
618 FilterOperations background_filters_; | 627 FilterOperations background_filters_; |
619 LayerPositionConstraint position_constraint_; | 628 LayerPositionConstraint position_constraint_; |
620 Layer* scroll_parent_; | 629 Layer* scroll_parent_; |
621 scoped_ptr<std::set<Layer*> > scroll_children_; | 630 scoped_ptr<std::set<Layer*> > scroll_children_; |
622 | 631 |
(...skipping 18 matching lines...) Expand all Loading... |
641 DrawProperties<Layer> draw_properties_; | 650 DrawProperties<Layer> draw_properties_; |
642 | 651 |
643 PaintProperties paint_properties_; | 652 PaintProperties paint_properties_; |
644 | 653 |
645 DISALLOW_COPY_AND_ASSIGN(Layer); | 654 DISALLOW_COPY_AND_ASSIGN(Layer); |
646 }; | 655 }; |
647 | 656 |
648 } // namespace cc | 657 } // namespace cc |
649 | 658 |
650 #endif // CC_LAYERS_LAYER_H_ | 659 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |