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

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

Issue 2894953003: Revert of cc : Don't draw animating layers which are transparent but raster them. (Closed)
Patch Set: 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 | « no previous file | 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 layer->set_contributes_to_drawn_render_surface(false); 367 layer->set_contributes_to_drawn_render_surface(false);
368 368
369 bool is_root = layer_tree_impl->IsRootLayer(layer); 369 bool is_root = layer_tree_impl->IsRootLayer(layer);
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 const EffectNode* effect_node = 377 bool skip_layer = !is_root && (skip_draw_properties_computation ||
378 property_trees->effect_tree.Node(layer->effect_tree_index()); 378 skip_for_invertibility);
379 bool has_animating_opacity_and_hidden =
380 effect_node->has_potential_opacity_animation &&
381 property_trees->effect_tree.EffectiveOpacity(effect_node) == 0.f &&
382 !effect_node->has_copy_request;
383 379
384 bool skip_layer = !is_root && (skip_draw_properties_computation || 380 layer->set_raster_even_if_not_in_rsll(skip_for_invertibility &&
385 skip_for_invertibility || 381 !skip_draw_properties_computation);
386 has_animating_opacity_and_hidden);
387
388 bool raster_even_if_not_in_rsll =
389 skip_draw_properties_computation
390 ? false
391 : has_animating_opacity_and_hidden || skip_for_invertibility;
392 layer->set_raster_even_if_not_in_rsll(raster_even_if_not_in_rsll);
393 if (skip_layer) 382 if (skip_layer)
394 continue; 383 continue;
395 384
396 bool layer_is_drawn = 385 bool layer_is_drawn =
397 property_trees->effect_tree.Node(layer->effect_tree_index())->is_drawn; 386 property_trees->effect_tree.Node(layer->effect_tree_index())->is_drawn;
398 bool layer_should_be_drawn = draw_property_utils::LayerNeedsUpdate( 387 bool layer_should_be_drawn = draw_property_utils::LayerNeedsUpdate(
399 layer, layer_is_drawn, property_trees); 388 layer, layer_is_drawn, property_trees);
400 if (!layer_should_be_drawn) 389 if (!layer_should_be_drawn)
401 continue; 390 continue;
402 391
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 670
682 PropertyTrees* GetPropertyTrees(Layer* layer) { 671 PropertyTrees* GetPropertyTrees(Layer* layer) {
683 return layer->layer_tree_host()->property_trees(); 672 return layer->layer_tree_host()->property_trees();
684 } 673 }
685 674
686 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 675 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
687 return layer->layer_tree_impl()->property_trees(); 676 return layer->layer_tree_impl()->property_trees();
688 } 677 }
689 678
690 } // namespace cc 679 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698