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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 374 |
375 virtual size_t GPUMemoryUsageInBytes() const; | 375 virtual size_t GPUMemoryUsageInBytes() const; |
376 | 376 |
377 void SetNeedsPushProperties(); | 377 void SetNeedsPushProperties(); |
378 | 378 |
379 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); | 379 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); |
380 | 380 |
381 void SetDebugInfo( | 381 void SetDebugInfo( |
382 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info); | 382 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info); |
383 | 383 |
384 void set_is_drawn_render_surface_layer_list_member(bool is_member) { | 384 void set_contributes_to_drawn_render_surface(bool is_member) { |
385 is_drawn_render_surface_layer_list_member_ = is_member; | 385 contributes_to_drawn_render_surface_ = is_member; |
386 } | 386 } |
387 | 387 |
388 bool is_drawn_render_surface_layer_list_member() const { | 388 bool contributes_to_drawn_render_surface() const { |
389 return is_drawn_render_surface_layer_list_member_; | 389 return contributes_to_drawn_render_surface_; |
390 } | 390 } |
391 | 391 |
392 bool IsDrawnScrollbar() { | 392 bool IsDrawnScrollbar() { |
393 return ToScrollbarLayer() && is_drawn_render_surface_layer_list_member_; | 393 return ToScrollbarLayer() && contributes_to_drawn_render_surface_; |
394 } | 394 } |
395 | 395 |
396 void set_may_contain_video(bool yes) { may_contain_video_ = yes; } | 396 void set_may_contain_video(bool yes) { may_contain_video_ = yes; } |
397 bool may_contain_video() const { return may_contain_video_; } | 397 bool may_contain_video() const { return may_contain_video_; } |
398 | 398 |
399 // Layers that share a sorting context id will be sorted together in 3d | 399 // Layers that share a sorting context id will be sorted together in 3d |
400 // space. 0 is a special value that means this layer will not be sorted and | 400 // space. 0 is a special value that means this layer will not be sorted and |
401 // will be drawn in paint order. | 401 // will be drawn in paint order. |
402 int GetSortingContextId() const; | 402 int GetSortingContextId() const; |
403 | 403 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 // Tracks if drawing-related properties have changed since last redraw. | 487 // Tracks if drawing-related properties have changed since last redraw. |
488 bool layer_property_changed_ : 1; | 488 bool layer_property_changed_ : 1; |
489 bool may_contain_video_ : 1; | 489 bool may_contain_video_ : 1; |
490 | 490 |
491 bool masks_to_bounds_ : 1; | 491 bool masks_to_bounds_ : 1; |
492 bool contents_opaque_ : 1; | 492 bool contents_opaque_ : 1; |
493 bool use_parent_backface_visibility_ : 1; | 493 bool use_parent_backface_visibility_ : 1; |
494 bool use_local_transform_for_backface_visibility_ : 1; | 494 bool use_local_transform_for_backface_visibility_ : 1; |
495 bool should_check_backface_visibility_ : 1; | 495 bool should_check_backface_visibility_ : 1; |
496 bool draws_content_ : 1; | 496 bool draws_content_ : 1; |
497 bool is_drawn_render_surface_layer_list_member_ : 1; | 497 bool contributes_to_drawn_render_surface_ : 1; |
498 | 498 |
499 // This is true if and only if the layer was ever ready since it last animated | 499 // This is true if and only if the layer was ever ready since it last animated |
500 // (all content was complete). | 500 // (all content was complete). |
501 bool was_ever_ready_since_last_transform_animation_ : 1; | 501 bool was_ever_ready_since_last_transform_animation_ : 1; |
502 | 502 |
503 Region non_fast_scrollable_region_; | 503 Region non_fast_scrollable_region_; |
504 Region touch_event_handler_region_; | 504 Region touch_event_handler_region_; |
505 SkColor background_color_; | 505 SkColor background_color_; |
506 SkColor safe_opaque_background_color_; | 506 SkColor safe_opaque_background_color_; |
507 | 507 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 // the overlay scrollbars. It's set on the scroll layer (not the scrollbar | 553 // the overlay scrollbars. It's set on the scroll layer (not the scrollbar |
554 // layers) and consumed by LayerTreeImpl::PushPropertiesTo during activation. | 554 // layers) and consumed by LayerTreeImpl::PushPropertiesTo during activation. |
555 bool needs_show_scrollbars_ : 1; | 555 bool needs_show_scrollbars_ : 1; |
556 | 556 |
557 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 557 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
558 }; | 558 }; |
559 | 559 |
560 } // namespace cc | 560 } // namespace cc |
561 | 561 |
562 #endif // CC_LAYERS_LAYER_IMPL_H_ | 562 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |