summaryrefslogtreecommitdiffstats
path: root/cc/surfaces/surface_aggregator.h
diff options
context:
space:
mode:
authorvmpstr <vmpstr@chromium.org>2015-06-02 15:14:46 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-02 22:15:17 +0000
commit0eca2e87110112c678c5f4c89b7f99e2de6026bb (patch)
tree6a3e39b085e5d8851c42ccf0b8a0f3e0a92775f6 /cc/surfaces/surface_aggregator.h
parent6c8207fe7d79a2150ce7c4007678d10c23475630 (diff)
downloadchromium_src-0eca2e87110112c678c5f4c89b7f99e2de6026bb.zip
chromium_src-0eca2e87110112c678c5f4c89b7f99e2de6026bb.tar.gz
chromium_src-0eca2e87110112c678c5f4c89b7f99e2de6026bb.tar.bz2
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}
Diffstat (limited to 'cc/surfaces/surface_aggregator.h')
-rw-r--r--cc/surfaces/surface_aggregator.h15
1 files changed, 8 insertions, 7 deletions
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<ResourceId, ResourceId>& 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