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 #include "cc/layers/layer.h" | 5 #include "cc/layers/layer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "cc/animation/animation_host.h" | 10 #include "cc/animation/animation_host.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 EXPECT_EQ(src->main_thread_scrolling_reasons_, | 135 EXPECT_EQ(src->main_thread_scrolling_reasons_, |
136 dest->main_thread_scrolling_reasons_); | 136 dest->main_thread_scrolling_reasons_); |
137 EXPECT_EQ(src->have_wheel_event_handlers_, | 137 EXPECT_EQ(src->have_wheel_event_handlers_, |
138 dest->have_wheel_event_handlers_); | 138 dest->have_wheel_event_handlers_); |
139 EXPECT_EQ(src->have_scroll_event_handlers_, | 139 EXPECT_EQ(src->have_scroll_event_handlers_, |
140 dest->have_scroll_event_handlers_); | 140 dest->have_scroll_event_handlers_); |
141 EXPECT_EQ(src->non_fast_scrollable_region_, | 141 EXPECT_EQ(src->non_fast_scrollable_region_, |
142 dest->non_fast_scrollable_region_); | 142 dest->non_fast_scrollable_region_); |
143 EXPECT_EQ(src->touch_event_handler_region_, | 143 EXPECT_EQ(src->touch_event_handler_region_, |
144 dest->touch_event_handler_region_); | 144 dest->touch_event_handler_region_); |
145 EXPECT_EQ(src->scroll_blocks_on_, dest->scroll_blocks_on_); | |
146 EXPECT_EQ(src->contents_opaque_, dest->contents_opaque_); | 145 EXPECT_EQ(src->contents_opaque_, dest->contents_opaque_); |
147 EXPECT_EQ(src->opacity_, dest->opacity_); | 146 EXPECT_EQ(src->opacity_, dest->opacity_); |
148 EXPECT_EQ(src->blend_mode_, dest->blend_mode_); | 147 EXPECT_EQ(src->blend_mode_, dest->blend_mode_); |
149 EXPECT_EQ(src->is_root_for_isolated_group_, | 148 EXPECT_EQ(src->is_root_for_isolated_group_, |
150 dest->is_root_for_isolated_group_); | 149 dest->is_root_for_isolated_group_); |
151 EXPECT_EQ(src->position_, dest->position_); | 150 EXPECT_EQ(src->position_, dest->position_); |
152 EXPECT_EQ(src->is_container_for_fixed_position_layers_, | 151 EXPECT_EQ(src->is_container_for_fixed_position_layers_, |
153 dest->is_container_for_fixed_position_layers_); | 152 dest->is_container_for_fixed_position_layers_); |
154 EXPECT_EQ(src->position_constraint_, dest->position_constraint_); | 153 EXPECT_EQ(src->position_constraint_, dest->position_constraint_); |
155 EXPECT_EQ(src->should_flatten_transform_, dest->should_flatten_transform_); | 154 EXPECT_EQ(src->should_flatten_transform_, dest->should_flatten_transform_); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 layer->draws_content_ = true; | 248 layer->draws_content_ = true; |
250 layer->hide_layer_and_subtree_ = false; | 249 layer->hide_layer_and_subtree_ = false; |
251 layer->has_render_surface_ = false; | 250 layer->has_render_surface_ = false; |
252 layer->masks_to_bounds_ = true; | 251 layer->masks_to_bounds_ = true; |
253 layer->main_thread_scrolling_reasons_ = | 252 layer->main_thread_scrolling_reasons_ = |
254 MainThreadScrollingReason::kNotScrollingOnMain; | 253 MainThreadScrollingReason::kNotScrollingOnMain; |
255 layer->have_wheel_event_handlers_ = true; | 254 layer->have_wheel_event_handlers_ = true; |
256 layer->have_scroll_event_handlers_ = false; | 255 layer->have_scroll_event_handlers_ = false; |
257 layer->non_fast_scrollable_region_ = Region(gfx::Rect(5, 1, 14, 3)); | 256 layer->non_fast_scrollable_region_ = Region(gfx::Rect(5, 1, 14, 3)); |
258 layer->touch_event_handler_region_ = Region(gfx::Rect(3, 14, 1, 5)); | 257 layer->touch_event_handler_region_ = Region(gfx::Rect(3, 14, 1, 5)); |
259 layer->scroll_blocks_on_ = SCROLL_BLOCKS_ON_NONE; | |
260 layer->contents_opaque_ = true; | 258 layer->contents_opaque_ = true; |
261 layer->opacity_ = 1.f; | 259 layer->opacity_ = 1.f; |
262 layer->blend_mode_ = SkXfermode::kSrcOver_Mode; | 260 layer->blend_mode_ = SkXfermode::kSrcOver_Mode; |
263 layer->is_root_for_isolated_group_ = true; | 261 layer->is_root_for_isolated_group_ = true; |
264 layer->position_ = gfx::PointF(3.14f, 6.28f); | 262 layer->position_ = gfx::PointF(3.14f, 6.28f); |
265 layer->is_container_for_fixed_position_layers_ = true; | 263 layer->is_container_for_fixed_position_layers_ = true; |
266 LayerPositionConstraint pos_con; | 264 LayerPositionConstraint pos_con; |
267 pos_con.set_is_fixed_to_bottom_edge(true); | 265 pos_con.set_is_fixed_to_bottom_edge(true); |
268 layer->position_constraint_ = pos_con; | 266 layer->position_constraint_ = pos_con; |
269 layer->should_flatten_transform_ = true; | 267 layer->should_flatten_transform_ = true; |
(...skipping 30 matching lines...) Expand all Loading... |
300 layer->draws_content_ = !layer->draws_content_; | 298 layer->draws_content_ = !layer->draws_content_; |
301 layer->hide_layer_and_subtree_ = !layer->hide_layer_and_subtree_; | 299 layer->hide_layer_and_subtree_ = !layer->hide_layer_and_subtree_; |
302 layer->has_render_surface_ = !layer->has_render_surface_; | 300 layer->has_render_surface_ = !layer->has_render_surface_; |
303 layer->masks_to_bounds_ = !layer->masks_to_bounds_; | 301 layer->masks_to_bounds_ = !layer->masks_to_bounds_; |
304 layer->main_thread_scrolling_reasons_ = | 302 layer->main_thread_scrolling_reasons_ = |
305 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects; | 303 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects; |
306 layer->have_wheel_event_handlers_ = !layer->have_wheel_event_handlers_; | 304 layer->have_wheel_event_handlers_ = !layer->have_wheel_event_handlers_; |
307 layer->have_scroll_event_handlers_ = !layer->have_scroll_event_handlers_; | 305 layer->have_scroll_event_handlers_ = !layer->have_scroll_event_handlers_; |
308 layer->non_fast_scrollable_region_ = Region(gfx::Rect(5, 1, 14, 3)); | 306 layer->non_fast_scrollable_region_ = Region(gfx::Rect(5, 1, 14, 3)); |
309 layer->touch_event_handler_region_ = Region(gfx::Rect(3, 14, 1, 5)); | 307 layer->touch_event_handler_region_ = Region(gfx::Rect(3, 14, 1, 5)); |
310 layer->scroll_blocks_on_ = SCROLL_BLOCKS_ON_WHEEL_EVENT; | |
311 layer->contents_opaque_ = !layer->contents_opaque_; | 308 layer->contents_opaque_ = !layer->contents_opaque_; |
312 layer->opacity_ = 3.14f; | 309 layer->opacity_ = 3.14f; |
313 layer->blend_mode_ = SkXfermode::kSrcIn_Mode; | 310 layer->blend_mode_ = SkXfermode::kSrcIn_Mode; |
314 layer->is_root_for_isolated_group_ = !layer->is_root_for_isolated_group_; | 311 layer->is_root_for_isolated_group_ = !layer->is_root_for_isolated_group_; |
315 layer->position_ = gfx::PointF(3.14f, 6.28f); | 312 layer->position_ = gfx::PointF(3.14f, 6.28f); |
316 layer->is_container_for_fixed_position_layers_ = | 313 layer->is_container_for_fixed_position_layers_ = |
317 !layer->is_container_for_fixed_position_layers_; | 314 !layer->is_container_for_fixed_position_layers_; |
318 LayerPositionConstraint pos_con; | 315 LayerPositionConstraint pos_con; |
319 pos_con.set_is_fixed_to_bottom_edge(true); | 316 pos_con.set_is_fixed_to_bottom_edge(true); |
320 layer->position_constraint_ = pos_con; | 317 layer->position_constraint_ = pos_con; |
(...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2131 EXPECT_EQ(MutableProperty::kNone, impl_layer->mutable_properties()); | 2128 EXPECT_EQ(MutableProperty::kNone, impl_layer->mutable_properties()); |
2132 | 2129 |
2133 test_layer->PushPropertiesTo(impl_layer.get()); | 2130 test_layer->PushPropertiesTo(impl_layer.get()); |
2134 | 2131 |
2135 EXPECT_EQ(2lu, impl_layer->element_id()); | 2132 EXPECT_EQ(2lu, impl_layer->element_id()); |
2136 EXPECT_EQ(MutableProperty::kTransform, impl_layer->mutable_properties()); | 2133 EXPECT_EQ(MutableProperty::kTransform, impl_layer->mutable_properties()); |
2137 } | 2134 } |
2138 | 2135 |
2139 } // namespace | 2136 } // namespace |
2140 } // namespace cc | 2137 } // namespace cc |
OLD | NEW |