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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 was_ever_ready_since_last_transform_animation_ = was_ready; | 440 was_ever_ready_since_last_transform_animation_ = was_ready; |
441 } | 441 } |
442 | 442 |
443 void NoteLayerPropertyChanged(); | 443 void NoteLayerPropertyChanged(); |
444 | 444 |
445 void SetHasWillChangeTransformHint(bool has_will_change); | 445 void SetHasWillChangeTransformHint(bool has_will_change); |
446 bool has_will_change_transform_hint() const { | 446 bool has_will_change_transform_hint() const { |
447 return has_will_change_transform_hint_; | 447 return has_will_change_transform_hint_; |
448 } | 448 } |
449 | 449 |
450 void SetPreferredRasterScale(float raster_scale); | 450 void SetPreferredRasterBounds(const gfx::Size& preferred_raster_bounds); |
451 bool has_preferred_raster_scale() { return has_preferred_raster_scale_; } | 451 bool has_preferred_raster_bounds() const { |
452 float preferred_raster_scale() const { return preferred_raster_scale_; } | 452 return has_preferred_raster_bounds_; |
453 void ClearPreferredRasterScale(); | 453 } |
| 454 const gfx::Size& preferred_raster_scale() const { |
| 455 return preferred_raster_bounds_; |
| 456 } |
| 457 void ClearPreferredRasterBounds(); |
454 | 458 |
455 AnimationHost* GetAnimationHost() const; | 459 AnimationHost* GetAnimationHost() const; |
456 | 460 |
457 ElementListType GetElementTypeForAnimation() const; | 461 ElementListType GetElementTypeForAnimation() const; |
458 | 462 |
459 protected: | 463 protected: |
460 LayerImpl(LayerTreeImpl* layer_impl, | 464 LayerImpl(LayerTreeImpl* layer_impl, |
461 int id, | 465 int id, |
462 scoped_refptr<SyncedScrollOffset> scroll_offset); | 466 scoped_refptr<SyncedScrollOffset> scroll_offset); |
463 LayerImpl(LayerTreeImpl* layer_impl, int id); | 467 LayerImpl(LayerTreeImpl* layer_impl, int id); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 565 |
562 // Group of properties that need to be computed based on the layer tree | 566 // Group of properties that need to be computed based on the layer tree |
563 // hierarchy before layers can be drawn. | 567 // hierarchy before layers can be drawn. |
564 DrawProperties draw_properties_; | 568 DrawProperties draw_properties_; |
565 PerformanceProperties<LayerImpl> performance_properties_; | 569 PerformanceProperties<LayerImpl> performance_properties_; |
566 | 570 |
567 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> | 571 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
568 owned_debug_info_; | 572 owned_debug_info_; |
569 base::trace_event::ConvertableToTraceFormat* debug_info_; | 573 base::trace_event::ConvertableToTraceFormat* debug_info_; |
570 std::unique_ptr<RenderSurfaceImpl> render_surface_; | 574 std::unique_ptr<RenderSurfaceImpl> render_surface_; |
571 float preferred_raster_scale_; | 575 gfx::Size preferred_raster_bounds_; |
572 | 576 |
573 bool has_preferred_raster_scale_ : 1; | 577 bool has_preferred_raster_bounds_ : 1; |
574 bool scrolls_drawn_descendant_ : 1; | 578 bool scrolls_drawn_descendant_ : 1; |
575 bool has_will_change_transform_hint_ : 1; | 579 bool has_will_change_transform_hint_ : 1; |
576 bool needs_push_properties_ : 1; | 580 bool needs_push_properties_ : 1; |
577 | 581 |
578 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 582 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
579 }; | 583 }; |
580 | 584 |
581 } // namespace cc | 585 } // namespace cc |
582 | 586 |
583 #endif // CC_LAYERS_LAYER_IMPL_H_ | 587 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |