summaryrefslogtreecommitdiffstats
path: root/cc/test/test_occlusion_tracker.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 22:11:55 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 22:11:55 +0000
commite312acafed0b2fe4be40b57f61b679b404534f73 (patch)
treeae3a6656a8fac45dc1b500893bd22efabb031b64 /cc/test/test_occlusion_tracker.h
parent2c03ccaa0ef2f8faa77254f93795df4a639a57ec (diff)
downloadchromium_src-e312acafed0b2fe4be40b57f61b679b404534f73.zip
chromium_src-e312acafed0b2fe4be40b57f61b679b404534f73.tar.gz
chromium_src-e312acafed0b2fe4be40b57f61b679b404534f73.tar.bz2
Do not clip inside OcclusionTracker: Contributing Surfaces Edition.
This is a follow-up for https://codereview.chromium.org/23708021 where we stopped clipping layers in the occlusion tracker. In this CL we stop clipping contributing RenderSurfaces as well. The contents inside the render surface are already clipped, and this is applied to the content rect. While we might be able to clip further in target space, we have to blow the result back up into the content space again, so this should produce about the same results. While we're at it, fix a bug in QuadCuller where it always used the surface draw transform to cull RenderPassDrawQuads even if the quad was for the replica, which could lead to us culling the replica of a surface when the surface itself is occluded. This was covered in occlusion tracker tests, but not in QuadCuller tests. R=enne BUG=344962,276725 Review URL: https://codereview.chromium.org/205443002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258431 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/test_occlusion_tracker.h')
-rw-r--r--cc/test/test_occlusion_tracker.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cc/test/test_occlusion_tracker.h b/cc/test/test_occlusion_tracker.h
index d62f8f6..f244a2d 100644
--- a/cc/test/test_occlusion_tracker.h
+++ b/cc/test/test_occlusion_tracker.h
@@ -27,6 +27,21 @@ class TestOcclusionTracker : public OcclusionTracker<LayerType> {
.occlusion_from_outside_target;
}
+ Region occlusion_on_contributing_surface_from_inside_target() const {
+ size_t stack_size = OcclusionTracker<LayerType>::stack_.size();
+ if (stack_size < 2)
+ return Region();
+ return OcclusionTracker<LayerType>::stack_[stack_size - 2]
+ .occlusion_from_inside_target;
+ }
+ Region occlusion_on_contributing_surface_from_outside_target() const {
+ size_t stack_size = OcclusionTracker<LayerType>::stack_.size();
+ if (stack_size < 2)
+ return Region();
+ return OcclusionTracker<LayerType>::stack_[stack_size - 2]
+ .occlusion_from_outside_target;
+ }
+
void set_occlusion_from_outside_target(const Region& region) {
OcclusionTracker<LayerType>::stack_.back().occlusion_from_outside_target =
region;