From 0eca2e87110112c678c5f4c89b7f99e2de6026bb Mon Sep 17 00:00:00 2001 From: vmpstr Date: Tue, 2 Jun 2015 15:14:46 -0700 Subject: cc: Remove DrawQuad::IterateResoruces This patch removes IterateResources function in favor of iterating resources directly on the quad. In order to accomplish this, each derived quad uses new resources object on the base class to store all of the resources it needs. This allows the calling code that used to call IterateResources with a callback to instead directly iterate all of the ids and manipulate them in any way that is required. This improves the performance of the IterateResources test by ~30%. BUG=492765 R=danakj, piman@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1152473006 Cr-Commit-Position: refs/heads/master@{#332476} --- cc/surfaces/surface_aggregator.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'cc/surfaces/surface_aggregator.h') diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h index 8ceb4eb..d946668 100644 --- a/cc/surfaces/surface_aggregator.h +++ b/cc/surfaces/surface_aggregator.h @@ -64,13 +64,14 @@ class CC_SURFACES_EXPORT SurfaceAggregator { const gfx::Transform& target_transform, const ClipData& clip_rect, RenderPass* dest_render_pass); - void CopyQuadsToPass(const QuadList& source_quad_list, - const SharedQuadStateList& source_shared_quad_state_list, - const DrawQuad::ResourceIteratorCallback& remap, - const gfx::Transform& target_transform, - const ClipData& clip_rect, - RenderPass* dest_pass, - SurfaceId surface_id); + void CopyQuadsToPass( + const QuadList& source_quad_list, + const SharedQuadStateList& source_shared_quad_state_list, + const base::hash_map& resource_to_child_map, + const gfx::Transform& target_transform, + const ClipData& clip_rect, + RenderPass* dest_pass, + SurfaceId surface_id); void CopyPasses(const DelegatedFrameData* frame_data, Surface* surface); // Remove Surfaces that were referenced before but aren't currently -- cgit v1.1