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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 2017263002: cc: Move copy requests from layers to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in comment Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/layer_test_common.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index 74981b8265b97cdcb882757f6913ba71c0d135cb..359399e7ff41ddb7e4974fa4b1531b14f698ba1c 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -53,7 +53,6 @@ static void ValidateRenderSurfaceForLayer(LayerImpl* layer) {
return;
DCHECK(!layer->mask_layer()) << "layer: " << layer->id();
DCHECK(!layer->replica_layer()) << "layer: " << layer->id();
- DCHECK(!layer->HasCopyRequest()) << "layer: " << layer->id();
}
#endif
@@ -63,6 +62,7 @@ void CalculateVisibleRects(
const typename LayerType::LayerListType& visible_layer_list,
const ClipTree& clip_tree,
const TransformTree& transform_tree,
+ const EffectTree& effect_tree,
bool non_root_surfaces_enabled) {
for (auto& layer : visible_layer_list) {
gfx::Size layer_bounds = layer->bounds();
@@ -79,7 +79,10 @@ void CalculateVisibleRects(
transform_tree.Node(layer->transform_tree_index());
if (!is_unclipped && !fully_visible) {
// The entire layer is visible if it has copy requests.
- if (layer->HasCopyRequest()) {
+ const EffectNode* effect_node =
+ effect_tree.Node(layer->effect_tree_index());
+ if (effect_node->data.has_copy_request &&
+ effect_node->owner_id == layer->id()) {
layer->set_visible_layer_rect(gfx::Rect(layer_bounds));
continue;
}
@@ -780,7 +783,8 @@ static void ComputeVisibleRectsInternal(
property_trees->effect_tree, update_layer_list, visible_layer_list);
CalculateVisibleRects<LayerImpl>(
*visible_layer_list, property_trees->clip_tree,
- property_trees->transform_tree, can_render_to_separate_surface);
+ property_trees->transform_tree, property_trees->effect_tree,
+ can_render_to_separate_surface);
}
void UpdatePropertyTrees(PropertyTrees* property_trees,
@@ -805,6 +809,7 @@ void ComputeVisibleRectsForTesting(PropertyTrees* property_trees,
LayerList* update_layer_list) {
CalculateVisibleRects<Layer>(*update_layer_list, property_trees->clip_tree,
property_trees->transform_tree,
+ property_trees->effect_tree,
can_render_to_separate_surface);
}
« no previous file with comments | « cc/test/layer_test_common.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698