| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "cc/animation/layer_animation_controller.h" | 13 #include "cc/animation/layer_animation_controller.h" |
| 14 #include "cc/animation/layer_animation_value_observer.h" | 14 #include "cc/animation/layer_animation_value_observer.h" |
| 15 #include "cc/base/cc_export.h" | 15 #include "cc/base/cc_export.h" |
| 16 #include "cc/base/region.h" | 16 #include "cc/base/region.h" |
| 17 #include "cc/base/scoped_ptr_vector.h" | 17 #include "cc/base/scoped_ptr_vector.h" |
| 18 #include "cc/layers/compositing_reasons.h" |
| 18 #include "cc/layers/draw_properties.h" | 19 #include "cc/layers/draw_properties.h" |
| 19 #include "cc/layers/layer_lists.h" | 20 #include "cc/layers/layer_lists.h" |
| 20 #include "cc/layers/layer_position_constraint.h" | 21 #include "cc/layers/layer_position_constraint.h" |
| 21 #include "cc/layers/paint_properties.h" | 22 #include "cc/layers/paint_properties.h" |
| 22 #include "cc/layers/render_surface.h" | 23 #include "cc/layers/render_surface.h" |
| 23 #include "cc/trees/occlusion_tracker.h" | 24 #include "cc/trees/occlusion_tracker.h" |
| 24 #include "skia/ext/refptr.h" | 25 #include "skia/ext/refptr.h" |
| 25 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" | 26 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" |
| 26 #include "third_party/skia/include/core/SkColor.h" | 27 #include "third_party/skia/include/core/SkColor.h" |
| 27 #include "third_party/skia/include/core/SkImageFilter.h" | 28 #include "third_party/skia/include/core/SkImageFilter.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 virtual bool DrawsContent() const; | 278 virtual bool DrawsContent() const; |
| 278 virtual void SavePaintProperties(); | 279 virtual void SavePaintProperties(); |
| 279 virtual void Update(ResourceUpdateQueue* queue, | 280 virtual void Update(ResourceUpdateQueue* queue, |
| 280 const OcclusionTracker* occlusion, | 281 const OcclusionTracker* occlusion, |
| 281 RenderingStats* stats) {} | 282 RenderingStats* stats) {} |
| 282 virtual bool NeedMoreUpdates(); | 283 virtual bool NeedMoreUpdates(); |
| 283 virtual void SetIsMask(bool is_mask) {} | 284 virtual void SetIsMask(bool is_mask) {} |
| 284 virtual void ReduceMemoryUsage() {} | 285 virtual void ReduceMemoryUsage() {} |
| 285 | 286 |
| 286 void SetDebugName(const std::string& debug_name); | 287 void SetDebugName(const std::string& debug_name); |
| 288 void SetCompositingReasons(CompositingReasons reasons); |
| 287 | 289 |
| 288 virtual void PushPropertiesTo(LayerImpl* layer); | 290 virtual void PushPropertiesTo(LayerImpl* layer); |
| 289 | 291 |
| 290 void CreateRenderSurface(); | 292 void CreateRenderSurface(); |
| 291 void ClearRenderSurface(); | 293 void ClearRenderSurface(); |
| 292 | 294 |
| 293 // The contents scale converts from logical, non-page-scaled pixels to target | 295 // The contents scale converts from logical, non-page-scaled pixels to target |
| 294 // pixels. The contents scale is 1 for the root layer as it is already in | 296 // pixels. The contents scale is 1 for the root layer as it is already in |
| 295 // physical pixels. By default contents scale is forced to be 1 except for | 297 // physical pixels. By default contents scale is forced to be 1 except for |
| 296 // subclasses of ContentsScalingLayer. | 298 // subclasses of ContentsScalingLayer. |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 gfx::Vector2d max_scroll_offset_; | 446 gfx::Vector2d max_scroll_offset_; |
| 445 bool scrollable_; | 447 bool scrollable_; |
| 446 bool should_scroll_on_main_thread_; | 448 bool should_scroll_on_main_thread_; |
| 447 bool have_wheel_event_handlers_; | 449 bool have_wheel_event_handlers_; |
| 448 Region non_fast_scrollable_region_; | 450 Region non_fast_scrollable_region_; |
| 449 Region touch_event_handler_region_; | 451 Region touch_event_handler_region_; |
| 450 gfx::PointF position_; | 452 gfx::PointF position_; |
| 451 gfx::PointF anchor_point_; | 453 gfx::PointF anchor_point_; |
| 452 SkColor background_color_; | 454 SkColor background_color_; |
| 453 std::string debug_name_; | 455 std::string debug_name_; |
| 456 CompositingReasons compositing_reasons_; |
| 454 float opacity_; | 457 float opacity_; |
| 455 skia::RefPtr<SkImageFilter> filter_; | 458 skia::RefPtr<SkImageFilter> filter_; |
| 456 WebKit::WebFilterOperations filters_; | 459 WebKit::WebFilterOperations filters_; |
| 457 WebKit::WebFilterOperations background_filters_; | 460 WebKit::WebFilterOperations background_filters_; |
| 458 float anchor_point_z_; | 461 float anchor_point_z_; |
| 459 bool is_container_for_fixed_position_layers_; | 462 bool is_container_for_fixed_position_layers_; |
| 460 LayerPositionConstraint position_constraint_; | 463 LayerPositionConstraint position_constraint_; |
| 461 bool is_drawable_; | 464 bool is_drawable_; |
| 462 bool masks_to_bounds_; | 465 bool masks_to_bounds_; |
| 463 bool contents_opaque_; | 466 bool contents_opaque_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 483 DrawProperties<Layer, RenderSurface> draw_properties_; | 486 DrawProperties<Layer, RenderSurface> draw_properties_; |
| 484 | 487 |
| 485 PaintProperties paint_properties_; | 488 PaintProperties paint_properties_; |
| 486 | 489 |
| 487 DISALLOW_COPY_AND_ASSIGN(Layer); | 490 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 488 }; | 491 }; |
| 489 | 492 |
| 490 } // namespace cc | 493 } // namespace cc |
| 491 | 494 |
| 492 #endif // CC_LAYERS_LAYER_H_ | 495 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |