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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 235 } |
236 bool draw_transform_is_animating() const { | 236 bool draw_transform_is_animating() const { |
237 return draw_properties_.target_space_transform_is_animating; | 237 return draw_properties_.target_space_transform_is_animating; |
238 } | 238 } |
239 bool screen_space_transform_is_animating() const { | 239 bool screen_space_transform_is_animating() const { |
240 return draw_properties_.screen_space_transform_is_animating; | 240 return draw_properties_.screen_space_transform_is_animating; |
241 } | 241 } |
242 bool screen_space_opacity_is_animating() const { | 242 bool screen_space_opacity_is_animating() const { |
243 return draw_properties_.screen_space_opacity_is_animating; | 243 return draw_properties_.screen_space_opacity_is_animating; |
244 } | 244 } |
245 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; } | |
246 bool is_clipped() const { return draw_properties_.is_clipped; } | 245 bool is_clipped() const { return draw_properties_.is_clipped; } |
247 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } | 246 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } |
248 gfx::Rect drawable_content_rect() const { | 247 gfx::Rect drawable_content_rect() const { |
249 return draw_properties_.drawable_content_rect; | 248 return draw_properties_.drawable_content_rect; |
250 } | 249 } |
251 gfx::Rect visible_content_rect() const { | 250 gfx::Rect visible_content_rect() const { |
252 return draw_properties_.visible_content_rect; | 251 return draw_properties_.visible_content_rect; |
253 } | 252 } |
254 Layer* render_target() { | 253 Layer* render_target() { |
255 DCHECK(!draw_properties_.render_target || | 254 DCHECK(!draw_properties_.render_target || |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 } | 449 } |
451 | 450 |
452 // The scale at which contents should be rastered, to match the scale at | 451 // The scale at which contents should be rastered, to match the scale at |
453 // which they will drawn to the screen. This scale is a component of the | 452 // which they will drawn to the screen. This scale is a component of the |
454 // contents scale but does not include page/device scale factors. | 453 // contents scale but does not include page/device scale factors. |
455 // TODO(danakj): This goes away when TiledLayer goes away. | 454 // TODO(danakj): This goes away when TiledLayer goes away. |
456 void set_raster_scale(float scale) { raster_scale_ = scale; } | 455 void set_raster_scale(float scale) { raster_scale_ = scale; } |
457 float raster_scale() const { return raster_scale_; } | 456 float raster_scale() const { return raster_scale_; } |
458 bool raster_scale_is_unknown() const { return raster_scale_ == 0.f; } | 457 bool raster_scale_is_unknown() const { return raster_scale_ == 0.f; } |
459 | 458 |
460 virtual bool SupportsLCDText() const; | |
461 | |
462 void SetNeedsPushProperties(); | 459 void SetNeedsPushProperties(); |
463 bool needs_push_properties() const { return needs_push_properties_; } | 460 bool needs_push_properties() const { return needs_push_properties_; } |
464 bool descendant_needs_push_properties() const { | 461 bool descendant_needs_push_properties() const { |
465 return num_dependents_need_push_properties_ > 0; | 462 return num_dependents_need_push_properties_ > 0; |
466 } | 463 } |
467 void reset_needs_push_properties_for_testing() { | 464 void reset_needs_push_properties_for_testing() { |
468 needs_push_properties_ = false; | 465 needs_push_properties_ = false; |
469 } | 466 } |
470 | 467 |
471 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); | 468 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 | 711 |
715 std::vector<FrameTimingRequest> frame_timing_requests_; | 712 std::vector<FrameTimingRequest> frame_timing_requests_; |
716 bool frame_timing_requests_dirty_; | 713 bool frame_timing_requests_dirty_; |
717 | 714 |
718 DISALLOW_COPY_AND_ASSIGN(Layer); | 715 DISALLOW_COPY_AND_ASSIGN(Layer); |
719 }; | 716 }; |
720 | 717 |
721 } // namespace cc | 718 } // namespace cc |
722 | 719 |
723 #endif // CC_LAYERS_LAYER_H_ | 720 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |