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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 2858853002: cc : Don't draw animating layers which are transparent but raster them. (Closed)
Patch Set: update comment and rebase Created 3 years, 7 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/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.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 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_impl.h" 5 #include "cc/trees/layer_tree_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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 property_trees_ = *property_trees; 365 property_trees_ = *property_trees;
366 bool render_surfaces_changed = 366 bool render_surfaces_changed =
367 property_trees_.effect_tree.CreateOrReuseRenderSurfaces( 367 property_trees_.effect_tree.CreateOrReuseRenderSurfaces(
368 &old_render_surfaces, this); 368 &old_render_surfaces, this);
369 if (render_surfaces_changed) 369 if (render_surfaces_changed)
370 set_needs_update_draw_properties(); 370 set_needs_update_draw_properties();
371 property_trees->effect_tree.PushCopyRequestsTo(&property_trees_.effect_tree); 371 property_trees->effect_tree.PushCopyRequestsTo(&property_trees_.effect_tree);
372 property_trees_.is_main_thread = false; 372 property_trees_.is_main_thread = false;
373 property_trees_.is_active = IsActiveTree(); 373 property_trees_.is_active = IsActiveTree();
374 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); 374 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false);
375 // The value of some effect node properties (like is_drawn) depends on
376 // whether we are on the active tree or not. So, we need to update the
377 // effect tree.
378 if (IsActiveTree())
379 property_trees_.effect_tree.set_needs_update(true);
380 } 375 }
381 376
382 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { 377 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
383 // The request queue should have been processed and does not require a push. 378 // The request queue should have been processed and does not require a push.
384 DCHECK_EQ(ui_resource_request_queue_.size(), 0u); 379 DCHECK_EQ(ui_resource_request_queue_.size(), 0u);
385 380
386 // To maintain the current scrolling node we need to use element ids which 381 // To maintain the current scrolling node we need to use element ids which
387 // are stable across the property tree update in SetPropertyTrees. 382 // are stable across the property tree update in SetPropertyTrees.
388 ElementId scrolling_element_id; 383 ElementId scrolling_element_id;
389 if (ScrollNode* scrolling_node = target_tree->CurrentlyScrollingNode()) 384 if (ScrollNode* scrolling_node = target_tree->CurrentlyScrollingNode())
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 2092
2098 void LayerTreeImpl::ResetAllChangeTracking() { 2093 void LayerTreeImpl::ResetAllChangeTracking() {
2099 layers_that_should_push_properties_.clear(); 2094 layers_that_should_push_properties_.clear();
2100 // Iterate over all layers, including masks. 2095 // Iterate over all layers, including masks.
2101 for (auto& layer : *layers_) 2096 for (auto& layer : *layers_)
2102 layer->ResetChangeTracking(); 2097 layer->ResetChangeTracking();
2103 property_trees_.ResetAllChangeTracking(); 2098 property_trees_.ResetAllChangeTracking();
2104 } 2099 }
2105 2100
2106 } // namespace cc 2101 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698