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

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

Issue 2899403003: cc: Give non-drawing layers that are rasterized a lower priority. (Closed)
Patch Set: type Created 3 years, 6 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/tiles/tiling_set_raster_queue_all.cc ('k') | cc/trees/layer_tree_host_common_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 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_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 bool skip_draw_properties_computation = 371 bool skip_draw_properties_computation =
372 draw_property_utils::LayerShouldBeSkippedForDrawPropertiesComputation( 372 draw_property_utils::LayerShouldBeSkippedForDrawPropertiesComputation(
373 layer, property_trees->transform_tree, property_trees->effect_tree); 373 layer, property_trees->transform_tree, property_trees->effect_tree);
374 374
375 bool skip_for_invertibility = SkipForInvertibility(layer, property_trees); 375 bool skip_for_invertibility = SkipForInvertibility(layer, property_trees);
376 376
377 bool skip_layer = !is_root && (skip_draw_properties_computation || 377 bool skip_layer = !is_root && (skip_draw_properties_computation ||
378 skip_for_invertibility); 378 skip_for_invertibility);
379 379
380 layer->set_raster_even_if_not_in_rsll(skip_for_invertibility && 380 layer->set_raster_even_if_not_drawn(skip_for_invertibility &&
381 !skip_draw_properties_computation); 381 !skip_draw_properties_computation);
382 if (skip_layer) 382 if (skip_layer)
383 continue; 383 continue;
384 384
385 bool layer_is_drawn = 385 bool layer_is_drawn =
386 property_trees->effect_tree.Node(layer->effect_tree_index())->is_drawn; 386 property_trees->effect_tree.Node(layer->effect_tree_index())->is_drawn;
387 bool layer_should_be_drawn = draw_property_utils::LayerNeedsUpdate( 387 bool layer_should_be_drawn = draw_property_utils::LayerNeedsUpdate(
388 layer, layer_is_drawn, property_trees); 388 layer, layer_is_drawn, property_trees);
389 if (!layer_should_be_drawn) 389 if (!layer_should_be_drawn)
390 continue; 390 continue;
391 391
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 670
671 PropertyTrees* GetPropertyTrees(Layer* layer) { 671 PropertyTrees* GetPropertyTrees(Layer* layer) {
672 return layer->layer_tree_host()->property_trees(); 672 return layer->layer_tree_host()->property_trees();
673 } 673 }
674 674
675 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 675 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
676 return layer->layer_tree_impl()->property_trees(); 676 return layer->layer_tree_impl()->property_trees();
677 } 677 }
678 678
679 } // namespace cc 679 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tiling_set_raster_queue_all.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698