summaryrefslogtreecommitdiffstats
path: root/cc/surfaces/surface_aggregator.cc
diff options
context:
space:
mode:
authorjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-16 06:07:45 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-16 06:09:03 +0000
commitc90f0d8d1fd4e95d6d26fc1454bf9c8094d51ecb (patch)
tree8b47c23a049f5e6d9e00e7f970637e0acc7fd908 /cc/surfaces/surface_aggregator.cc
parente510e37dda59f01b402489d2b8fdc9b2f05d4f0c (diff)
downloadchromium_src-c90f0d8d1fd4e95d6d26fc1454bf9c8094d51ecb.zip
chromium_src-c90f0d8d1fd4e95d6d26fc1454bf9c8094d51ecb.tar.gz
chromium_src-c90f0d8d1fd4e95d6d26fc1454bf9c8094d51ecb.tar.bz2
Enqueuing new frames in a Surface should cause Displays to reaggregate it
Keep track of which Surfaces were included in a Display last frame, so if a new frame is enqueued in a Surface the Displays containing it will tell their clients to redraw. This way the browser compositor doesn't have to commit if only the renderer contents changed. BUG= Review URL: https://codereview.chromium.org/432093003 Cr-Commit-Position: refs/heads/master@{#290103} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290103 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/surfaces/surface_aggregator.cc')
-rw-r--r--cc/surfaces/surface_aggregator.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 7ffa965..e4e77a1 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -135,6 +135,7 @@ bool SurfaceAggregator::TakeResources(Surface* surface,
void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
RenderPass* dest_pass) {
SurfaceId surface_id = surface_quad->surface_id;
+ contained_surfaces_->insert(surface_id);
// If this surface's id is already in our referenced set then it creates
// a cycle in the graph and should be dropped.
if (referenced_surfaces_.count(surface_id))
@@ -287,7 +288,11 @@ void SurfaceAggregator::CopyPasses(const RenderPassList& source_pass_list,
}
}
-scoped_ptr<CompositorFrame> SurfaceAggregator::Aggregate(SurfaceId surface_id) {
+scoped_ptr<CompositorFrame> SurfaceAggregator::Aggregate(
+ SurfaceId surface_id,
+ std::set<SurfaceId>* contained_surfaces) {
+ contained_surfaces_ = contained_surfaces;
+ contained_surfaces_->insert(surface_id);
Surface* surface = manager_->GetSurfaceForId(surface_id);
DCHECK(surface);
const CompositorFrame* root_surface_frame = surface->GetEligibleFrame();