Chromium Code Reviews| 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 936 append_quads_data.checkerboarded_no_recording_content_area); | 936 append_quads_data.checkerboarded_no_recording_content_area); |
| 937 rendering_stats_instrumentation_->AddCheckerboardedNeedsRasterContentArea( | 937 rendering_stats_instrumentation_->AddCheckerboardedNeedsRasterContentArea( |
| 938 append_quads_data.checkerboarded_needs_raster_content_area); | 938 append_quads_data.checkerboarded_needs_raster_content_area); |
| 939 | 939 |
| 940 num_missing_tiles += append_quads_data.num_missing_tiles; | 940 num_missing_tiles += append_quads_data.num_missing_tiles; |
| 941 num_incomplete_tiles += append_quads_data.num_incomplete_tiles; | 941 num_incomplete_tiles += append_quads_data.num_incomplete_tiles; |
| 942 checkerboarded_no_recording_content_area += | 942 checkerboarded_no_recording_content_area += |
| 943 append_quads_data.checkerboarded_no_recording_content_area; | 943 append_quads_data.checkerboarded_no_recording_content_area; |
| 944 checkerboarded_needs_raster_content_area += | 944 checkerboarded_needs_raster_content_area += |
| 945 append_quads_data.checkerboarded_needs_raster_content_area; | 945 append_quads_data.checkerboarded_needs_raster_content_area; |
| 946 TransformNode* transform_node = | |
| 947 active_tree()->property_trees()->transform_tree.Node( | |
| 948 layer->transform_tree_index()); | |
|
wkorman
2017/05/20 01:31:27
Are we assured that we will always have a transfor
pdr.
2017/05/22 17:03:34
We've had a bunch of crashes in this area recently
| |
| 946 if (append_quads_data.num_missing_tiles > 0) { | 949 if (append_quads_data.num_missing_tiles > 0) { |
| 947 have_missing_animated_tiles |= | 950 have_missing_animated_tiles |= |
| 948 !layer->was_ever_ready_since_last_transform_animation() || | 951 !transform_node->ready_since_animation || |
| 949 layer->screen_space_transform_is_animating(); | 952 layer->screen_space_transform_is_animating(); |
| 950 } else { | 953 } else { |
| 951 layer->set_was_ever_ready_since_last_transform_animation(true); | 954 transform_node->ready_since_animation = true; |
|
jaydasika
2017/05/22 18:11:29
As layer->transform node is not 1:1, you can't do
| |
| 952 } | 955 } |
| 953 } | 956 } |
| 954 frame->activation_dependencies.insert( | 957 frame->activation_dependencies.insert( |
| 955 frame->activation_dependencies.end(), | 958 frame->activation_dependencies.end(), |
| 956 append_quads_data.activation_dependencies.begin(), | 959 append_quads_data.activation_dependencies.begin(), |
| 957 append_quads_data.activation_dependencies.end()); | 960 append_quads_data.activation_dependencies.end()); |
| 958 } | 961 } |
| 959 | 962 |
| 960 // If CommitToActiveTree() is true, then we wait to draw until | 963 // If CommitToActiveTree() is true, then we wait to draw until |
| 961 // NotifyReadyToDraw. That means we're in as good shape as is possible now, | 964 // NotifyReadyToDraw. That means we're in as good shape as is possible now, |
| (...skipping 3266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4228 transform_node->is_currently_animating = | 4231 transform_node->is_currently_animating = |
| 4229 state.currently_running[property]; | 4232 state.currently_running[property]; |
| 4230 if (mask.potentially_animating[property]) { | 4233 if (mask.potentially_animating[property]) { |
| 4231 transform_node->has_potential_animation = | 4234 transform_node->has_potential_animation = |
| 4232 state.potentially_animating[property]; | 4235 state.potentially_animating[property]; |
| 4233 transform_node->has_only_translation_animations = | 4236 transform_node->has_only_translation_animations = |
| 4234 mutator_host()->HasOnlyTranslationTransforms(element_id, | 4237 mutator_host()->HasOnlyTranslationTransforms(element_id, |
| 4235 list_type); | 4238 list_type); |
| 4236 property_trees->transform_tree.set_needs_update(true); | 4239 property_trees->transform_tree.set_needs_update(true); |
| 4237 tree->set_needs_update_draw_properties(); | 4240 tree->set_needs_update_draw_properties(); |
| 4238 // TODO(crbug.com/702777): | 4241 transform_node->ready_since_animation = false; |
| 4239 // was_ever_ready_since_last_transform_animation should not live on | |
| 4240 // layers. | |
| 4241 if (LayerImpl* layer = tree->LayerByElementId(element_id)) { | |
| 4242 layer->set_was_ever_ready_since_last_transform_animation(false); | |
| 4243 } | |
| 4244 } | 4242 } |
| 4245 } | 4243 } |
| 4246 break; | 4244 break; |
| 4247 case TargetProperty::OPACITY: | 4245 case TargetProperty::OPACITY: |
| 4248 if (EffectNode* effect_node = | 4246 if (EffectNode* effect_node = |
| 4249 property_trees->effect_tree.FindNodeFromElementId(element_id)) { | 4247 property_trees->effect_tree.FindNodeFromElementId(element_id)) { |
| 4250 if (mask.currently_running[property]) | 4248 if (mask.currently_running[property]) |
| 4251 effect_node->is_currently_animating_opacity = | 4249 effect_node->is_currently_animating_opacity = |
| 4252 state.currently_running[property]; | 4250 state.currently_running[property]; |
| 4253 if (mask.potentially_animating[property]) { | 4251 if (mask.potentially_animating[property]) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4348 | 4346 |
| 4349 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { | 4347 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { |
| 4350 if (!element_id) | 4348 if (!element_id) |
| 4351 return; | 4349 return; |
| 4352 if (ScrollbarAnimationController* animation_controller = | 4350 if (ScrollbarAnimationController* animation_controller = |
| 4353 ScrollbarAnimationControllerForElementId(element_id)) | 4351 ScrollbarAnimationControllerForElementId(element_id)) |
| 4354 animation_controller->DidScrollUpdate(); | 4352 animation_controller->DidScrollUpdate(); |
| 4355 } | 4353 } |
| 4356 | 4354 |
| 4357 } // namespace cc | 4355 } // namespace cc |
| OLD | NEW |