summaryrefslogtreecommitdiffstats
path: root/cc/quads/draw_quad.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-12 17:11:30 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-12 17:11:30 +0000
commit8e1da691f5c68010cd24b6fc468458f248d9b6c8 (patch)
tree40cd5f80d809c7b6eed8f94d10010bb59366188f /cc/quads/draw_quad.cc
parent832c83b1cd554367fed1c53b5d249c6492d08d89 (diff)
downloadchromium_src-8e1da691f5c68010cd24b6fc468458f248d9b6c8.zip
chromium_src-8e1da691f5c68010cd24b6fc468458f248d9b6c8.tar.gz
chromium_src-8e1da691f5c68010cd24b6fc468458f248d9b6c8.tar.bz2
cc: Preserve partial culling from child compositor.
When the child compositor performs occlusion culling and determines what part of the quad is visible, we should preserve this in the browser compositor, and only shrink the visible (unoccluded) rect on quads if we're able due to occlusion in the browser. We should not grow the visible rect ever. Tests: QuadCullerTest.PartialCullingNotDestroyed QuadCullerTest.PartialCullingWithOcclusionNotDestroyed R=alokp@chromium.org, piman BUG=305757 Review URL: https://codereview.chromium.org/26726003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/quads/draw_quad.cc')
-rw-r--r--cc/quads/draw_quad.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/quads/draw_quad.cc b/cc/quads/draw_quad.cc
index 0d021d9..f3cd818 100644
--- a/cc/quads/draw_quad.cc
+++ b/cc/quads/draw_quad.cc
@@ -40,6 +40,13 @@ void DrawQuad::SetAll(const SharedQuadState* shared_quad_state,
gfx::Rect opaque_rect,
gfx::Rect visible_rect,
bool needs_blending) {
+ DCHECK(rect.Contains(visible_rect)) << "rect: " << rect.ToString()
+ << " visible_rect: "
+ << visible_rect.ToString();
+ DCHECK(opaque_rect.IsEmpty() || rect.Contains(opaque_rect))
+ << "rect: " << rect.ToString() << "opaque_rect "
+ << opaque_rect.ToString();
+
this->material = material;
this->rect = rect;
this->opaque_rect = opaque_rect;