summaryrefslogtreecommitdiffstats
path: root/cc/trees/occlusion_tracker.cc
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-01 05:07:15 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-01 05:07:15 +0000
commitfbc293322412d2a41edd14dae1ae5cc6135f62ef (patch)
tree5bf315796ac3bec1931b41dc2b9eb55f75bdba9d /cc/trees/occlusion_tracker.cc
parentbaed42c24524270f2927f9f2b1f78645a2a31afb (diff)
downloadchromium_src-fbc293322412d2a41edd14dae1ae5cc6135f62ef.zip
chromium_src-fbc293322412d2a41edd14dae1ae5cc6135f62ef.tar.gz
chromium_src-fbc293322412d2a41edd14dae1ae5cc6135f62ef.tar.bz2
cc: Delete RenderSurface caching.
RenderSurface caching has been disabled for some time and getting in the way of optimizing OcclusionTracker. The proposed optimization cannot distinguish between inside and outside occlusion, which is needed by surface caching. The proposed optimization for OcclusionTracker is here: https://codereview.chromium.org/23708021/ BUG=276725 Review URL: https://codereview.chromium.org/23792012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/occlusion_tracker.cc')
-rw-r--r--cc/trees/occlusion_tracker.cc40
1 files changed, 5 insertions, 35 deletions
diff --git a/cc/trees/occlusion_tracker.cc b/cc/trees/occlusion_tracker.cc
index abaefa7..7e24e84 100644
--- a/cc/trees/occlusion_tracker.cc
+++ b/cc/trees/occlusion_tracker.cc
@@ -347,10 +347,10 @@ void OcclusionTrackerBase<LayerType, RenderSurfaceType>::LeaveToRenderTarget(
gfx::Rect unoccluded_replica_rect;
if (old_target->background_filters().HasFilterThatMovesPixels()) {
unoccluded_surface_rect = UnoccludedContributingSurfaceContentRect(
- old_target, false, old_surface->content_rect(), NULL);
+ old_target, false, old_surface->content_rect());
if (old_target->has_replica()) {
unoccluded_replica_rect = UnoccludedContributingSurfaceContentRect(
- old_target, true, old_surface->content_rect(), NULL);
+ old_target, true, old_surface->content_rect());
}
}
@@ -510,10 +510,7 @@ bool OcclusionTrackerBase<LayerType, RenderSurfaceType>::Occluded(
const gfx::Transform& draw_transform,
bool impl_draw_transform_is_unknown,
bool is_clipped,
- gfx::Rect clip_rect_in_target,
- bool* has_occlusion_from_outside_target_surface) const {
- if (has_occlusion_from_outside_target_surface)
- *has_occlusion_from_outside_target_surface = false;
+ gfx::Rect clip_rect_in_target) const {
if (prevent_occlusion_)
return false;
@@ -562,13 +559,6 @@ bool OcclusionTrackerBase<LayerType, RenderSurfaceType>::Occluded(
gfx::RectF unoccluded_rect_in_target_surface =
unoccluded_region_in_target_surface.bounds();
- if (has_occlusion_from_outside_target_surface) {
- // Check if the unoccluded rect shrank when applying outside occlusion.
- *has_occlusion_from_outside_target_surface = !gfx::SubtractRects(
- unoccluded_rect_in_target_surface_without_outside_occlusion,
- unoccluded_rect_in_target_surface).IsEmpty();
- }
-
return unoccluded_rect_in_target_surface.IsEmpty();
}
@@ -580,10 +570,7 @@ gfx::Rect OcclusionTrackerBase<LayerType, RenderSurfaceType>::
const gfx::Transform& draw_transform,
bool impl_draw_transform_is_unknown,
bool is_clipped,
- gfx::Rect clip_rect_in_target,
- bool* has_occlusion_from_outside_target_surface) const {
- if (has_occlusion_from_outside_target_surface)
- *has_occlusion_from_outside_target_surface = false;
+ gfx::Rect clip_rect_in_target) const {
if (prevent_occlusion_)
return content_rect;
@@ -636,13 +623,6 @@ gfx::Rect OcclusionTrackerBase<LayerType, RenderSurfaceType>::
unoccluded_rect_in_target_surface));
unoccluded_rect.Intersect(content_rect);
- if (has_occlusion_from_outside_target_surface) {
- // Check if the unoccluded rect shrank when applying outside occlusion.
- *has_occlusion_from_outside_target_surface = !gfx::SubtractRects(
- unoccluded_rect_in_target_surface_without_outside_occlusion,
- unoccluded_rect_in_target_surface).IsEmpty();
- }
-
return unoccluded_rect;
}
@@ -651,8 +631,7 @@ gfx::Rect OcclusionTrackerBase<LayerType, RenderSurfaceType>::
UnoccludedContributingSurfaceContentRect(
const LayerType* layer,
bool for_replica,
- gfx::Rect content_rect,
- bool* has_occlusion_from_outside_target_surface) const {
+ gfx::Rect content_rect) const {
DCHECK(!stack_.empty());
// The layer is a contributing render_target so it should have a surface.
DCHECK(layer->render_surface());
@@ -664,8 +643,6 @@ gfx::Rect OcclusionTrackerBase<LayerType, RenderSurfaceType>::
// target in the occlusion tracker.
DCHECK_EQ(layer, stack_.back().target);
- if (has_occlusion_from_outside_target_surface)
- *has_occlusion_from_outside_target_surface = false;
if (prevent_occlusion_)
return content_rect;
@@ -726,13 +703,6 @@ gfx::Rect OcclusionTrackerBase<LayerType, RenderSurfaceType>::
unoccluded_rect_in_target_surface));
unoccluded_rect.Intersect(content_rect);
- if (has_occlusion_from_outside_target_surface) {
- // Check if the unoccluded rect shrank when applying outside occlusion.
- *has_occlusion_from_outside_target_surface = !gfx::SubtractRects(
- unoccluded_rect_in_target_surface_without_outside_occlusion,
- unoccluded_rect_in_target_surface).IsEmpty();
- }
-
return unoccluded_rect;
}