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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 | 312 |
313 DrawProperties& draw_properties() { return draw_properties_; } | 313 DrawProperties& draw_properties() { return draw_properties_; } |
314 const DrawProperties& draw_properties() const { return draw_properties_; } | 314 const DrawProperties& draw_properties() const { return draw_properties_; } |
315 | 315 |
316 gfx::Transform DrawTransform() const; | 316 gfx::Transform DrawTransform() const; |
317 gfx::Transform ScreenSpaceTransform() const; | 317 gfx::Transform ScreenSpaceTransform() const; |
318 PerformanceProperties<LayerImpl>& performance_properties() { | 318 PerformanceProperties<LayerImpl>& performance_properties() { |
319 return performance_properties_; | 319 return performance_properties_; |
320 } | 320 } |
321 | 321 |
322 bool can_use_lcd_text() const; | |
ajuma
2016/06/01 15:38:38
Style nit: Since this isn't "simple" any more, it
sunxd
2016/06/01 15:54:48
Done.
| |
323 | |
322 // Setter for draw_properties_. | 324 // Setter for draw_properties_. |
323 void set_visible_layer_rect(const gfx::Rect& visible_rect) { | 325 void set_visible_layer_rect(const gfx::Rect& visible_rect) { |
324 draw_properties_.visible_layer_rect = visible_rect; | 326 draw_properties_.visible_layer_rect = visible_rect; |
325 } | 327 } |
326 void set_clip_rect(const gfx::Rect& clip_rect) { | 328 void set_clip_rect(const gfx::Rect& clip_rect) { |
327 draw_properties_.clip_rect = clip_rect; | 329 draw_properties_.clip_rect = clip_rect; |
328 } | 330 } |
329 | 331 |
330 // The following are shortcut accessors to get various information from | 332 // The following are shortcut accessors to get various information from |
331 // draw_properties_ | 333 // draw_properties_ |
332 float draw_opacity() const { return draw_properties_.opacity; } | 334 float draw_opacity() const { return draw_properties_.opacity; } |
333 bool screen_space_transform_is_animating() const { | 335 bool screen_space_transform_is_animating() const { |
334 return draw_properties_.screen_space_transform_is_animating; | 336 return draw_properties_.screen_space_transform_is_animating; |
335 } | 337 } |
336 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; } | |
337 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } | 338 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } |
338 gfx::Rect drawable_content_rect() const { | 339 gfx::Rect drawable_content_rect() const { |
339 return draw_properties_.drawable_content_rect; | 340 return draw_properties_.drawable_content_rect; |
340 } | 341 } |
341 gfx::Rect visible_layer_rect() const { | 342 gfx::Rect visible_layer_rect() const { |
342 return draw_properties_.visible_layer_rect; | 343 return draw_properties_.visible_layer_rect; |
343 } | 344 } |
344 | 345 |
345 // The client should be responsible for setting bounds, content bounds and | 346 // The client should be responsible for setting bounds, content bounds and |
346 // contents scale to appropriate values. LayerImpl doesn't calculate any of | 347 // contents scale to appropriate values. LayerImpl doesn't calculate any of |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
653 | 654 |
654 bool scrolls_drawn_descendant_; | 655 bool scrolls_drawn_descendant_; |
655 bool has_will_change_transform_hint_; | 656 bool has_will_change_transform_hint_; |
656 | 657 |
657 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 658 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
658 }; | 659 }; |
659 | 660 |
660 } // namespace cc | 661 } // namespace cc |
661 | 662 |
662 #endif // CC_LAYERS_LAYER_IMPL_H_ | 663 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |