Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: cc/layers/layer_impl.cc

Issue 2105173006: cc: Clear entries from animations maps only when main thread wins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove_DCHECK Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 layer_tree_impl_->AddToElementMap(this); 89 layer_tree_impl_->AddToElementMap(this);
90 90
91 SetNeedsPushProperties(); 91 SetNeedsPushProperties();
92 } 92 }
93 93
94 LayerImpl::~LayerImpl() { 94 LayerImpl::~LayerImpl() {
95 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_); 95 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_);
96 96
97 layer_tree_impl_->UnregisterScrollLayer(this); 97 layer_tree_impl_->UnregisterScrollLayer(this);
98 layer_tree_impl_->UnregisterLayer(this); 98 layer_tree_impl_->UnregisterLayer(this);
99 layer_tree_impl_->RemoveLayerShouldPushProperties(this);
100 99
101 layer_tree_impl_->RemoveFromElementMap(this); 100 layer_tree_impl_->RemoveFromElementMap(this);
102 101
103 TRACE_EVENT_OBJECT_DELETED_WITH_ID( 102 TRACE_EVENT_OBJECT_DELETED_WITH_ID(
104 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerImpl", this); 103 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerImpl", this);
105 } 104 }
106 105
107 void LayerImpl::SetHasWillChangeTransformHint(bool has_will_change) { 106 void LayerImpl::SetHasWillChangeTransformHint(bool has_will_change) {
108 has_will_change_transform_hint_ = has_will_change; 107 has_will_change_transform_hint_ = has_will_change;
109 } 108 }
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 .layer_transforms_should_scale_layer_contents) { 1194 .layer_transforms_should_scale_layer_contents) {
1196 return default_scale; 1195 return default_scale;
1197 } 1196 }
1198 1197
1199 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1198 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1200 ScreenSpaceTransform(), default_scale); 1199 ScreenSpaceTransform(), default_scale);
1201 return std::max(transform_scales.x(), transform_scales.y()); 1200 return std::max(transform_scales.x(), transform_scales.y());
1202 } 1201 }
1203 1202
1204 } // namespace cc 1203 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698