Index: cc/surfaces/surface_aggregator.cc |
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc |
index 7ffa965eeb1316d7ceec0d4e349efc91b401e958..e4e77a12ea713952c2e24bf7b407d7074012e549 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(); |