summaryrefslogtreecommitdiffstats
path: root/cc/surfaces/surface_aggregator.h
diff options
context:
space:
mode:
authorjbauman <jbauman@chromium.org>2015-04-09 18:09:36 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-10 01:11:03 +0000
commitac6d656bdce3f288dc94affc7126f3c7e9056e1e (patch)
tree7d5ebf375800f96419e174b876720cefa8d86570 /cc/surfaces/surface_aggregator.h
parent912a6c31f7c8ca3cd9b7dfdc44fcc0a12278ad3f (diff)
downloadchromium_src-ac6d656bdce3f288dc94affc7126f3c7e9056e1e.zip
chromium_src-ac6d656bdce3f288dc94affc7126f3c7e9056e1e.tar.gz
chromium_src-ac6d656bdce3f288dc94affc7126f3c7e9056e1e.tar.bz2
Avoid unnecessary renderpass copy in SurfaceAggregator
We can fold the IterateResources on a quad into the existing iteration over the copied quads. This gets rid of a copy. The code still needs to do a walk over all the quads before to ensure the resource references are valid. BUG=463996 Review URL: https://codereview.chromium.org/594993002 Cr-Commit-Position: refs/heads/master@{#324554}
Diffstat (limited to 'cc/surfaces/surface_aggregator.h')
-rw-r--r--cc/surfaces/surface_aggregator.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h
index 8ae3b04..50984da 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -10,6 +10,7 @@
#include "base/containers/hash_tables.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.h"
+#include "cc/quads/draw_quad.h"
#include "cc/quads/render_pass.h"
#include "cc/resources/transferable_resource.h"
#include "cc/surfaces/surface_id.h"
@@ -64,6 +65,7 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
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& content_to_target_transform,
const ClipData& clip_rect,
RenderPass* dest_pass,
@@ -74,9 +76,8 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
// referenced from the ResourceProvider.
void RemoveUnreferencedChildren();
- bool TakeResources(Surface* surface,
- const DelegatedFrameData* frame_data,
- RenderPassList* render_pass_list);
+ bool ValidateResources(Surface* surface,
+ const DelegatedFrameData* frame_data);
int ChildIdForSurface(Surface* surface);
gfx::Rect DamageRectForSurface(const Surface* surface,
const RenderPass& source,