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

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

Issue 1236943002: Revert of Compute if a layer is clipped outside CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('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 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 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 DCHECK(!(OpacityIsAnimating() && layer->OpacityIsAnimatingOnImplOnly())); 1208 DCHECK(!(OpacityIsAnimating() && layer->OpacityIsAnimatingOnImplOnly()));
1209 layer->SetBlendMode(blend_mode_); 1209 layer->SetBlendMode(blend_mode_);
1210 layer->SetIsRootForIsolatedGroup(is_root_for_isolated_group_); 1210 layer->SetIsRootForIsolatedGroup(is_root_for_isolated_group_);
1211 layer->SetPosition(position_); 1211 layer->SetPosition(position_);
1212 layer->SetIsContainerForFixedPositionLayers( 1212 layer->SetIsContainerForFixedPositionLayers(
1213 IsContainerForFixedPositionLayers()); 1213 IsContainerForFixedPositionLayers());
1214 layer->SetPositionConstraint(position_constraint_); 1214 layer->SetPositionConstraint(position_constraint_);
1215 layer->SetShouldFlattenTransform(should_flatten_transform_); 1215 layer->SetShouldFlattenTransform(should_flatten_transform_);
1216 layer->set_should_flatten_transform_from_property_tree( 1216 layer->set_should_flatten_transform_from_property_tree(
1217 should_flatten_transform_from_property_tree_); 1217 should_flatten_transform_from_property_tree_);
1218 layer->set_is_clipped(is_clipped_);
1219 layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_); 1218 layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_);
1220 if (!layer->TransformIsAnimatingOnImplOnly() && !TransformIsAnimating()) 1219 if (!layer->TransformIsAnimatingOnImplOnly() && !TransformIsAnimating())
1221 layer->SetTransformAndInvertibility(transform_, transform_is_invertible_); 1220 layer->SetTransformAndInvertibility(transform_, transform_is_invertible_);
1222 DCHECK(!(TransformIsAnimating() && layer->TransformIsAnimatingOnImplOnly())); 1221 DCHECK(!(TransformIsAnimating() && layer->TransformIsAnimatingOnImplOnly()));
1223 layer->Set3dSortingContextId(sorting_context_id_); 1222 layer->Set3dSortingContextId(sorting_context_id_);
1224 layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_); 1223 layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_);
1225 1224
1226 layer->SetScrollClipLayer(scroll_clip_layer_id_); 1225 layer->SetScrollClipLayer(scroll_clip_layer_id_);
1227 layer->set_user_scrollable_horizontal(user_scrollable_horizontal_); 1226 layer->set_user_scrollable_horizontal(user_scrollable_horizontal_);
1228 layer->set_user_scrollable_vertical(user_scrollable_vertical_); 1227 layer->set_user_scrollable_vertical(user_scrollable_vertical_);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 return nullptr; 1409 return nullptr;
1411 } 1410 }
1412 1411
1413 void Layer::SetHasRenderSurface(bool has_render_surface) { 1412 void Layer::SetHasRenderSurface(bool has_render_surface) {
1414 if (has_render_surface_ == has_render_surface) 1413 if (has_render_surface_ == has_render_surface)
1415 return; 1414 return;
1416 has_render_surface_ = has_render_surface; 1415 has_render_surface_ = has_render_surface;
1417 // We do not need SetNeedsCommit here, since this is only ever called 1416 // We do not need SetNeedsCommit here, since this is only ever called
1418 // during a commit, from CalculateDrawProperties. 1417 // during a commit, from CalculateDrawProperties.
1419 SetNeedsPushProperties(); 1418 SetNeedsPushProperties();
1420 layer_tree_host_->property_trees()->needs_rebuild = true;
1421 } 1419 }
1422 1420
1423 void Layer::CreateRenderSurface() { 1421 void Layer::CreateRenderSurface() {
1424 DCHECK(!render_surface_); 1422 DCHECK(!render_surface_);
1425 render_surface_ = make_scoped_ptr(new RenderSurface(this)); 1423 render_surface_ = make_scoped_ptr(new RenderSurface(this));
1426 } 1424 }
1427 1425
1428 void Layer::ClearRenderSurface() { 1426 void Layer::ClearRenderSurface() {
1429 render_surface_ = nullptr; 1427 render_surface_ = nullptr;
1430 } 1428 }
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 ? layer_tree_host()->meta_information_sequence_number() 1659 ? layer_tree_host()->meta_information_sequence_number()
1662 : 0; 1660 : 0;
1663 } 1661 }
1664 1662
1665 bool Layer::sorted_for_recursion() { 1663 bool Layer::sorted_for_recursion() {
1666 return sorted_for_recursion_tracker_ == 1664 return sorted_for_recursion_tracker_ ==
1667 layer_tree_host()->meta_information_sequence_number(); 1665 layer_tree_host()->meta_information_sequence_number();
1668 } 1666 }
1669 1667
1670 } // namespace cc 1668 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698