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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2035863003: cc: Add mask and replica layer ids to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index f1ef243b83c595dcbfda11fe6afb26488f1a3c20..63256d484ccc2219ea6806fe2f4f7ae3c37e099e 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -647,7 +647,7 @@ void LayerTreeHostImpl::TrackDamageForAllSurfaces(
render_surface->damage_tracker()->UpdateDamageTrackingState(
render_surface->layer_list(), render_surface,
render_surface->SurfacePropertyChangedOnlyFromDescendant(),
- render_surface->content_rect(), render_surface_layer->mask_layer(),
+ render_surface->content_rect(), render_surface->MaskLayer(),
render_surface_layer->filters());
}
}
@@ -697,14 +697,14 @@ static void AppendQuadsForRenderSurfaceLayer(
const Occlusion& occlusion = surface->occlusion_in_content_space();
SkColor debug_border_color = surface->GetDebugBorderColor();
float debug_border_width = surface->GetDebugBorderWidth();
- LayerImpl* mask_layer = layer->mask_layer();
+ LayerImpl* mask_layer = surface->MaskLayer();
surface->AppendQuads(target_render_pass, draw_transform, occlusion,
debug_border_color, debug_border_width, mask_layer,
append_quads_data, contributing_render_pass->id);
// Add replica after the surface so that it appears below the surface.
- if (layer->has_replica()) {
+ if (surface->HasReplica()) {
const gfx::Transform& replica_draw_transform =
surface->replica_draw_transform();
Occlusion replica_occlusion = occlusion.GetOcclusionWithGivenDrawTransform(
@@ -719,7 +719,7 @@ static void AppendQuadsForRenderSurfaceLayer(
// to draw the layer and its reflection in. For now we only apply a separate
// reflection mask if the contents don't have a mask of their own.
LayerImpl* replica_mask_layer =
- mask_layer ? mask_layer : layer->replica_layer()->mask_layer();
+ surface->HasMask() ? surface->MaskLayer() : surface->ReplicaMaskLayer();
surface->AppendQuads(target_render_pass, replica_draw_transform,
replica_occlusion, replica_debug_border_color,
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698