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

Unified Diff: cc/trees/occlusion_tracker.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Rebased to resolve conflict. Created 3 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 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/property_tree.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 8aa513bfe1775686c25bf2fc20bd292a60d5313e..2d20af4e03e7a1cabc62cd79404fb39232dce546 100644
--- a/cc/trees/occlusion_tracker.cc
+++ b/cc/trees/occlusion_tracker.cc
@@ -190,15 +190,17 @@ void OcclusionTracker::FinishedRenderTarget(
// Readbacks always happen on render targets so we only need to check
// for readbacks here.
- bool target_is_only_for_copy_request =
- finished_target_surface->HasCopyRequest() && is_hidden;
+ bool target_is_only_for_copy_request_or_force_render_surface =
+ (finished_target_surface->HasCopyRequest() ||
+ finished_target_surface->ShouldCacheRenderSurface()) &&
+ is_hidden;
// 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_surface->HasMask() ||
finished_target_surface->draw_opacity() < 1 ||
!finished_target_surface->UsesDefaultBlendMode() ||
- target_is_only_for_copy_request ||
+ target_is_only_for_copy_request_or_force_render_surface ||
finished_target_surface->Filters().HasFilterThatAffectsOpacity()) {
stack_.back().occlusion_from_outside_target.Clear();
stack_.back().occlusion_from_inside_target.Clear();
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698