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

Unified Diff: cc/trees/occlusion_tracker.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_impl_unittest.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/occlusion_tracker.cc
diff --git a/cc/trees/occlusion_tracker.cc b/cc/trees/occlusion_tracker.cc
index ba68f4e76e8c83c67769df951a02f69abdd4f397..573d123db64f0901edf64e88646a1ea79653197b 100644
--- a/cc/trees/occlusion_tracker.cc
+++ b/cc/trees/occlusion_tracker.cc
@@ -181,7 +181,7 @@ void OcclusionTracker::FinishedRenderTarget(const LayerImpl* finished_target) {
// If the occlusion within the surface can not be applied to things outside of
// the surface's subtree, then clear the occlusion here so it won't be used.
- if (finished_target->mask_layer() || surface->draw_opacity() < 1 ||
+ if (surface->MaskLayer() || surface->draw_opacity() < 1 ||
!finished_target->uses_default_blend_mode() ||
target_is_only_for_copy_request ||
finished_target->filters().HasFilterThatAffectsOpacity()) {
@@ -265,7 +265,7 @@ void OcclusionTracker::LeaveToRenderTarget(const LayerImpl* new_target) {
stack_[last_index].occlusion_from_inside_target,
old_surface->is_clipped(), old_surface->clip_rect(),
old_surface->draw_transform());
- if (old_target->has_replica() && !old_target->replica_has_mask()) {
+ if (old_surface->HasReplica() && !old_surface->HasReplicaMask()) {
old_occlusion_from_inside_target_in_new_target.Union(
TransformSurfaceOpaqueRegion(
stack_[last_index].occlusion_from_inside_target,
@@ -285,7 +285,7 @@ void OcclusionTracker::LeaveToRenderTarget(const LayerImpl* new_target) {
old_surface->draw_transform());
unoccluded_surface_rect =
surface_occlusion.GetUnoccludedContentRect(old_surface->content_rect());
- if (old_target->has_replica()) {
+ if (old_surface->HasReplica()) {
Occlusion replica_occlusion = GetCurrentOcclusionForContributingSurface(
old_surface->replica_draw_transform());
unoccluded_replica_rect = replica_occlusion.GetUnoccludedContentRect(
@@ -331,7 +331,7 @@ void OcclusionTracker::LeaveToRenderTarget(const LayerImpl* new_target) {
new_target,
&stack_.back().occlusion_from_outside_target);
- if (!old_target->has_replica())
+ if (!old_surface->HasReplica())
return;
ReduceOcclusionBelowSurface(old_target,
unoccluded_replica_rect,
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698