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

Unified Diff: cc/test/mock_quad_culler.cc

Issue 205503002: cc: Apply occlusion before creating quads in RenderSurfaceImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: append-rendersurface: headers Created 6 years, 9 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/test/mock_quad_culler.h ('k') | cc/trees/quad_culler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/mock_quad_culler.cc
diff --git a/cc/test/mock_quad_culler.cc b/cc/test/mock_quad_culler.cc
index d15f126aed5fc79b51fb756e21259abe58bb8378..54d631c54983849f553f46b86e5d4452b523fbbb 100644
--- a/cc/test/mock_quad_culler.cc
+++ b/cc/test/mock_quad_culler.cc
@@ -30,11 +30,22 @@ SharedQuadState* MockQuadCuller::UseSharedQuadState(
gfx::Rect MockQuadCuller::UnoccludedContentRect(
const gfx::Rect& content_rect,
const gfx::Transform& draw_transform) {
+ DCHECK(draw_transform.IsIdentity() || occluded_content_rect_.IsEmpty());
gfx::Rect result = content_rect;
result.Subtract(occluded_content_rect_);
return result;
}
+gfx::Rect MockQuadCuller::UnoccludedContributingSurfaceContentRect(
+ const gfx::Rect& content_rect,
+ const gfx::Transform& draw_transform) {
+ DCHECK(draw_transform.IsIdentity() ||
+ occluded_content_rect_for_contributing_surface_.IsEmpty());
+ gfx::Rect result = content_rect;
+ result.Subtract(occluded_content_rect_for_contributing_surface_);
+ return result;
+}
+
bool MockQuadCuller::MaybeAppend(scoped_ptr<DrawQuad> draw_quad) {
if (!draw_quad->rect.IsEmpty()) {
active_quad_list_->push_back(draw_quad.Pass());
« no previous file with comments | « cc/test/mock_quad_culler.h ('k') | cc/trees/quad_culler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698