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

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

Issue 2110683004: cc: Move filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 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/trees/layer_tree_host.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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 draw_property_utils::ComputeSurfaceDrawProperties(property_trees, 376 draw_property_utils::ComputeSurfaceDrawProperties(property_trees,
377 surface); 377 surface);
378 378
379 // Ignore occlusion from outside the surface when surface contents need to 379 // Ignore occlusion from outside the surface when surface contents need to
380 // be fully drawn. Layers with copy-request need to be complete. We could 380 // be fully drawn. Layers with copy-request need to be complete. We could
381 // be smarter about layers with replica and exclude regions where both 381 // be smarter about layers with replica and exclude regions where both
382 // layer and the replica are occluded, but this seems like overkill. The 382 // layer and the replica are occluded, but this seems like overkill. The
383 // same is true for layers with filters that move pixels. 383 // same is true for layers with filters that move pixels.
384 // TODO(senorblanco): make this smarter for the SkImageFilter case (check 384 // TODO(senorblanco): make this smarter for the SkImageFilter case (check
385 // for pixel-moving filters) 385 // for pixel-moving filters)
386 bool is_occlusion_immune = surface->HasCopyRequest() || 386 const FilterOperations& filters = surface->Filters();
387 surface->HasReplica() || 387 bool is_occlusion_immune =
388 layer->filters().HasReferenceFilter() || 388 surface->HasCopyRequest() || surface->HasReplica() ||
389 layer->filters().HasFilterThatMovesPixels(); 389 filters.HasReferenceFilter() || filters.HasFilterThatMovesPixels();
390 if (is_occlusion_immune) { 390 if (is_occlusion_immune) {
391 surface->SetNearestOcclusionImmuneAncestor(surface); 391 surface->SetNearestOcclusionImmuneAncestor(surface);
392 } else if (is_root) { 392 } else if (is_root) {
393 surface->SetNearestOcclusionImmuneAncestor(nullptr); 393 surface->SetNearestOcclusionImmuneAncestor(nullptr);
394 } else { 394 } else {
395 surface->SetNearestOcclusionImmuneAncestor( 395 surface->SetNearestOcclusionImmuneAncestor(
396 surface->render_target()->nearest_occlusion_immune_ancestor()); 396 surface->render_target()->nearest_occlusion_immune_ancestor());
397 } 397 }
398 } 398 }
399 bool layer_should_be_drawn = draw_property_utils::LayerNeedsUpdate( 399 bool layer_should_be_drawn = draw_property_utils::LayerNeedsUpdate(
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 692
693 PropertyTrees* GetPropertyTrees(Layer* layer) { 693 PropertyTrees* GetPropertyTrees(Layer* layer) {
694 return layer->layer_tree_host()->property_trees(); 694 return layer->layer_tree_host()->property_trees();
695 } 695 }
696 696
697 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 697 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
698 return layer->layer_tree_impl()->property_trees(); 698 return layer->layer_tree_impl()->property_trees();
699 } 699 }
700 700
701 } // namespace cc 701 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.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