diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 18:41:10 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 18:41:10 +0000 |
commit | ba0f8d96f0b836e450aba1828769c4313278d3d1 (patch) | |
tree | 46baad36af7345108a66dd2e18a9f80292d365f1 /cc/test/mock_quad_culler.h | |
parent | 6cde1bf32a99da8b48e73f0d9e27bdd939a4e47c (diff) | |
download | chromium_src-ba0f8d96f0b836e450aba1828769c4313278d3d1.zip chromium_src-ba0f8d96f0b836e450aba1828769c4313278d3d1.tar.gz chromium_src-ba0f8d96f0b836e450aba1828769c4313278d3d1.tar.bz2 |
cc: Apply occlusion before creating quads in RenderSurfaceImpl.
This makes the AppendQuads method query occlusion directly and subtract
it from the quads it would create before they are created, skipping
quads that are completely occluded and avoiding a malloc/free for them.
Depends on: https://codereview.chromium.org/205443002/
Depends on: https://codereview.chromium.org/203463015/
R=enne
BUG=344962
Review URL: https://codereview.chromium.org/205503002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/mock_quad_culler.h')
-rw-r--r-- | cc/test/mock_quad_culler.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cc/test/mock_quad_culler.h b/cc/test/mock_quad_culler.h index 543b8ec..2d9486b 100644 --- a/cc/test/mock_quad_culler.h +++ b/cc/test/mock_quad_culler.h @@ -26,6 +26,9 @@ class MockQuadCuller : public QuadSink { virtual gfx::Rect UnoccludedContentRect(const gfx::Rect& content_rect, const gfx::Transform& draw_transform) OVERRIDE; + virtual gfx::Rect UnoccludedContributingSurfaceContentRect( + const gfx::Rect& content_rect, + const gfx::Transform& draw_transform) OVERRIDE; virtual bool MaybeAppend(scoped_ptr<DrawQuad> draw_quad) OVERRIDE; virtual void Append(scoped_ptr<DrawQuad> draw_quad) OVERRIDE; @@ -38,6 +41,11 @@ class MockQuadCuller : public QuadSink { occluded_content_rect_ = occluded; } + void set_occluded_content_rect_for_contributing_surface( + const gfx::Rect& occluded) { + occluded_content_rect_for_contributing_surface_ = occluded; + } + void clear_lists() { active_quad_list_->clear(); active_shared_quad_state_list_->clear(); @@ -49,6 +57,7 @@ class MockQuadCuller : public QuadSink { SharedQuadStateList* active_shared_quad_state_list_; SharedQuadStateList shared_quad_state_storage_; gfx::Rect occluded_content_rect_; + gfx::Rect occluded_content_rect_for_contributing_surface_; }; } // namespace cc |