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 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "cc/animation/layer_animation_controller.h" | 14 #include "cc/animation/layer_animation_controller.h" |
15 #include "cc/animation/layer_animation_value_observer.h" | 15 #include "cc/animation/layer_animation_value_observer.h" |
16 #include "cc/base/cc_export.h" | 16 #include "cc/base/cc_export.h" |
17 #include "cc/base/region.h" | 17 #include "cc/base/region.h" |
18 #include "cc/layers/draw_properties.h" | 18 #include "cc/layers/draw_properties.h" |
19 #include "cc/layers/layer_lists.h" | 19 #include "cc/layers/layer_lists.h" |
20 #include "cc/layers/layer_position_constraint.h" | 20 #include "cc/layers/layer_position_constraint.h" |
21 #include "cc/layers/paint_properties.h" | 21 #include "cc/layers/paint_properties.h" |
22 #include "cc/layers/render_surface.h" | 22 #include "cc/layers/render_surface.h" |
23 #include "cc/trees/occlusion_tracker.h" | 23 #include "cc/trees/occlusion_tracker.h" |
24 #include "skia/ext/refptr.h" | 24 #include "skia/ext/refptr.h" |
25 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositingReaso ns.h" | |
danakj
2013/05/15 14:02:43
Can we avoid adding new WebKit headers in cc? AIUI
enne (OOO)
2013/05/15 15:51:51
+1000
You'll need to add a parallel enum structur
| |
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" |
28 #include "ui/gfx/rect.h" | 29 #include "ui/gfx/rect.h" |
29 #include "ui/gfx/rect_f.h" | 30 #include "ui/gfx/rect_f.h" |
30 #include "ui/gfx/transform.h" | 31 #include "ui/gfx/transform.h" |
31 | 32 |
32 namespace WebKit { | 33 namespace WebKit { |
33 class WebAnimationDelegate; | 34 class WebAnimationDelegate; |
34 class WebLayerScrollClient; | 35 class WebLayerScrollClient; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 // These methods typically need to be overwritten by derived classes. | 281 // These methods typically need to be overwritten by derived classes. |
281 virtual bool DrawsContent() const; | 282 virtual bool DrawsContent() const; |
282 virtual void SavePaintProperties(); | 283 virtual void SavePaintProperties(); |
283 virtual void Update(ResourceUpdateQueue* queue, | 284 virtual void Update(ResourceUpdateQueue* queue, |
284 const OcclusionTracker* occlusion, | 285 const OcclusionTracker* occlusion, |
285 RenderingStats* stats) {} | 286 RenderingStats* stats) {} |
286 virtual bool NeedMoreUpdates(); | 287 virtual bool NeedMoreUpdates(); |
287 virtual void SetIsMask(bool is_mask) {} | 288 virtual void SetIsMask(bool is_mask) {} |
288 | 289 |
289 void SetDebugName(const std::string& debug_name); | 290 void SetDebugName(const std::string& debug_name); |
291 void SetCompositingReasons(WebKit::WebCompositingReasons reasons); | |
290 | 292 |
291 virtual void PushPropertiesTo(LayerImpl* layer); | 293 virtual void PushPropertiesTo(LayerImpl* layer); |
292 | 294 |
293 void CreateRenderSurface(); | 295 void CreateRenderSurface(); |
294 void ClearRenderSurface(); | 296 void ClearRenderSurface(); |
295 | 297 |
296 // The contents scale converts from logical, non-page-scaled pixels to target | 298 // The contents scale converts from logical, non-page-scaled pixels to target |
297 // pixels. The contents scale is 1 for the root layer as it is already in | 299 // pixels. The contents scale is 1 for the root layer as it is already in |
298 // physical pixels. By default contents scale is forced to be 1 except for | 300 // physical pixels. By default contents scale is forced to be 1 except for |
299 // subclasses of ContentsScalingLayer. | 301 // subclasses of ContentsScalingLayer. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
445 gfx::Vector2d max_scroll_offset_; | 447 gfx::Vector2d max_scroll_offset_; |
446 bool scrollable_; | 448 bool scrollable_; |
447 bool should_scroll_on_main_thread_; | 449 bool should_scroll_on_main_thread_; |
448 bool have_wheel_event_handlers_; | 450 bool have_wheel_event_handlers_; |
449 Region non_fast_scrollable_region_; | 451 Region non_fast_scrollable_region_; |
450 Region touch_event_handler_region_; | 452 Region touch_event_handler_region_; |
451 gfx::PointF position_; | 453 gfx::PointF position_; |
452 gfx::PointF anchor_point_; | 454 gfx::PointF anchor_point_; |
453 SkColor background_color_; | 455 SkColor background_color_; |
454 std::string debug_name_; | 456 std::string debug_name_; |
457 WebKit::WebCompositingReasons compositing_reasons_; | |
455 float opacity_; | 458 float opacity_; |
456 skia::RefPtr<SkImageFilter> filter_; | 459 skia::RefPtr<SkImageFilter> filter_; |
457 WebKit::WebFilterOperations filters_; | 460 WebKit::WebFilterOperations filters_; |
458 WebKit::WebFilterOperations background_filters_; | 461 WebKit::WebFilterOperations background_filters_; |
459 float anchor_point_z_; | 462 float anchor_point_z_; |
460 bool is_container_for_fixed_position_layers_; | 463 bool is_container_for_fixed_position_layers_; |
461 LayerPositionConstraint position_constraint_; | 464 LayerPositionConstraint position_constraint_; |
462 bool is_drawable_; | 465 bool is_drawable_; |
463 bool masks_to_bounds_; | 466 bool masks_to_bounds_; |
464 bool contents_opaque_; | 467 bool contents_opaque_; |
(...skipping 19 matching lines...) Expand all Loading... | |
484 DrawProperties<Layer, RenderSurface> draw_properties_; | 487 DrawProperties<Layer, RenderSurface> draw_properties_; |
485 | 488 |
486 PaintProperties paint_properties_; | 489 PaintProperties paint_properties_; |
487 | 490 |
488 DISALLOW_COPY_AND_ASSIGN(Layer); | 491 DISALLOW_COPY_AND_ASSIGN(Layer); |
489 }; | 492 }; |
490 | 493 |
491 } // namespace cc | 494 } // namespace cc |
492 | 495 |
493 #endif // CC_LAYERS_LAYER_H_ | 496 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |