OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "cc/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 : layer_id_(id), | 52 : layer_id_(id), |
53 layer_tree_impl_(tree_impl), | 53 layer_tree_impl_(tree_impl), |
54 test_properties_(nullptr), | 54 test_properties_(nullptr), |
55 scroll_clip_layer_id_(Layer::INVALID_ID), | 55 scroll_clip_layer_id_(Layer::INVALID_ID), |
56 main_thread_scrolling_reasons_( | 56 main_thread_scrolling_reasons_( |
57 MainThreadScrollingReason::kNotScrollingOnMain), | 57 MainThreadScrollingReason::kNotScrollingOnMain), |
58 user_scrollable_horizontal_(true), | 58 user_scrollable_horizontal_(true), |
59 user_scrollable_vertical_(true), | 59 user_scrollable_vertical_(true), |
60 should_flatten_transform_from_property_tree_(false), | 60 should_flatten_transform_from_property_tree_(false), |
61 layer_property_changed_(false), | 61 layer_property_changed_(false), |
| 62 may_contain_video_(false), |
62 masks_to_bounds_(false), | 63 masks_to_bounds_(false), |
63 contents_opaque_(false), | 64 contents_opaque_(false), |
64 use_parent_backface_visibility_(false), | 65 use_parent_backface_visibility_(false), |
65 use_local_transform_for_backface_visibility_(false), | 66 use_local_transform_for_backface_visibility_(false), |
66 should_check_backface_visibility_(false), | 67 should_check_backface_visibility_(false), |
67 draws_content_(false), | 68 draws_content_(false), |
68 is_drawn_render_surface_layer_list_member_(false), | 69 is_drawn_render_surface_layer_list_member_(false), |
69 was_ever_ready_since_last_transform_animation_(true), | 70 was_ever_ready_since_last_transform_animation_(true), |
70 background_color_(0), | 71 background_color_(0), |
71 safe_opaque_background_color_(0), | 72 safe_opaque_background_color_(0), |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 DCHECK(layer->IsActive()); | 326 DCHECK(layer->IsActive()); |
326 | 327 |
327 layer->offset_to_transform_parent_ = offset_to_transform_parent_; | 328 layer->offset_to_transform_parent_ = offset_to_transform_parent_; |
328 layer->main_thread_scrolling_reasons_ = main_thread_scrolling_reasons_; | 329 layer->main_thread_scrolling_reasons_ = main_thread_scrolling_reasons_; |
329 layer->user_scrollable_horizontal_ = user_scrollable_horizontal_; | 330 layer->user_scrollable_horizontal_ = user_scrollable_horizontal_; |
330 layer->user_scrollable_vertical_ = user_scrollable_vertical_; | 331 layer->user_scrollable_vertical_ = user_scrollable_vertical_; |
331 layer->should_flatten_transform_from_property_tree_ = | 332 layer->should_flatten_transform_from_property_tree_ = |
332 should_flatten_transform_from_property_tree_; | 333 should_flatten_transform_from_property_tree_; |
333 layer->masks_to_bounds_ = masks_to_bounds_; | 334 layer->masks_to_bounds_ = masks_to_bounds_; |
334 layer->contents_opaque_ = contents_opaque_; | 335 layer->contents_opaque_ = contents_opaque_; |
| 336 layer->may_contain_video_ = may_contain_video_; |
335 layer->use_parent_backface_visibility_ = use_parent_backface_visibility_; | 337 layer->use_parent_backface_visibility_ = use_parent_backface_visibility_; |
336 layer->use_local_transform_for_backface_visibility_ = | 338 layer->use_local_transform_for_backface_visibility_ = |
337 use_local_transform_for_backface_visibility_; | 339 use_local_transform_for_backface_visibility_; |
338 layer->should_check_backface_visibility_ = should_check_backface_visibility_; | 340 layer->should_check_backface_visibility_ = should_check_backface_visibility_; |
339 layer->draws_content_ = draws_content_; | 341 layer->draws_content_ = draws_content_; |
340 layer->non_fast_scrollable_region_ = non_fast_scrollable_region_; | 342 layer->non_fast_scrollable_region_ = non_fast_scrollable_region_; |
341 layer->touch_event_handler_region_ = touch_event_handler_region_; | 343 layer->touch_event_handler_region_ = touch_event_handler_region_; |
342 layer->background_color_ = background_color_; | 344 layer->background_color_ = background_color_; |
343 layer->safe_opaque_background_color_ = safe_opaque_background_color_; | 345 layer->safe_opaque_background_color_ = safe_opaque_background_color_; |
344 layer->blend_mode_ = blend_mode_; | 346 layer->blend_mode_ = blend_mode_; |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 .layer_transforms_should_scale_layer_contents) { | 1216 .layer_transforms_should_scale_layer_contents) { |
1215 return default_scale; | 1217 return default_scale; |
1216 } | 1218 } |
1217 | 1219 |
1218 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1220 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
1219 ScreenSpaceTransform(), default_scale); | 1221 ScreenSpaceTransform(), default_scale); |
1220 return std::max(transform_scales.x(), transform_scales.y()); | 1222 return std::max(transform_scales.x(), transform_scales.y()); |
1221 } | 1223 } |
1222 | 1224 |
1223 } // namespace cc | 1225 } // namespace cc |
OLD | NEW |