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

Unified Diff: cc/layers/layer.cc

Issue 1231453002: Compute if a layer is clipped outside CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialized is_clipped_ 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index b9867d6217c88f845a55e22f8cc11abfd0369ff6..85a11b57f4b31d669fe051fd3ef806f389051850 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -58,6 +58,7 @@ Layer::Layer(const LayerSettings& settings)
num_layer_or_descendants_with_input_handler_(0),
num_children_with_scroll_parent_(0),
should_flatten_transform_from_property_tree_(false),
+ is_clipped_(false),
should_scroll_on_main_thread_(false),
have_wheel_event_handlers_(false),
have_scroll_event_handlers_(false),
@@ -1215,6 +1216,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->SetShouldFlattenTransform(should_flatten_transform_);
layer->set_should_flatten_transform_from_property_tree(
should_flatten_transform_from_property_tree_);
+ layer->set_is_clipped(is_clipped_);
layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_);
if (!layer->TransformIsAnimatingOnImplOnly() && !TransformIsAnimating())
layer->SetTransformAndInvertibility(transform_, transform_is_invertible_);
@@ -1416,6 +1418,7 @@ void Layer::SetHasRenderSurface(bool has_render_surface) {
// We do not need SetNeedsCommit here, since this is only ever called
// during a commit, from CalculateDrawProperties.
SetNeedsPushProperties();
+ layer_tree_host_->property_trees()->needs_rebuild = true;
}
void Layer::CreateRenderSurface() {
« 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