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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 547723002: Reland of: cc: Add occlusion checker as a fixed view of occlusion tracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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/resources/tile_manager_unittest.cc ('k') | cc/trees/occlusion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 328234f5fd100d7fcbcf595ed3f1f3434919c81c..e368bb837732942570980c9da0a9e35e84677a5a 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -520,8 +520,13 @@ bool LayerTreeImpl::UpdateDrawProperties() {
occlusion_tracker->EnterLayer(it);
LayerImpl* layer = *it;
+ const Occlusion& occlusion_in_content_space =
+ occlusion_tracker ? occlusion_tracker->GetCurrentOcclusionForLayer(
+ layer->draw_transform())
+ : Occlusion();
+
if (it.represents_itself())
- layer->UpdateTiles(occlusion_tracker.get());
+ layer->UpdateTiles(occlusion_in_content_space);
if (!it.represents_contributing_render_surface()) {
if (occlusion_tracker)
@@ -530,10 +535,10 @@ bool LayerTreeImpl::UpdateDrawProperties() {
}
if (layer->mask_layer())
- layer->mask_layer()->UpdateTiles(occlusion_tracker.get());
+ layer->mask_layer()->UpdateTiles(occlusion_in_content_space);
if (layer->replica_layer() && layer->replica_layer()->mask_layer())
layer->replica_layer()->mask_layer()->UpdateTiles(
- occlusion_tracker.get());
+ occlusion_in_content_space);
if (occlusion_tracker)
occlusion_tracker->LeaveLayer(it);
« no previous file with comments | « cc/resources/tile_manager_unittest.cc ('k') | cc/trees/occlusion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698