Index: cc/surfaces/display.cc |
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc |
index 4e01b7069dda977a5def78c8427da3a838cfb42b..d202df37f6d07368e5094a54157e34403a3db44b 100644 |
--- a/cc/surfaces/display.cc |
+++ b/cc/surfaces/display.cc |
@@ -89,10 +89,8 @@ bool Display::Draw() { |
if (!output_surface_) |
return false; |
- contained_surfaces_.clear(); |
- |
scoped_ptr<CompositorFrame> frame = |
- aggregator_->Aggregate(current_surface_id_, &contained_surfaces_); |
+ aggregator_->Aggregate(current_surface_id_); |
if (!frame) |
return false; |
@@ -116,10 +114,11 @@ bool Display::Draw() { |
disable_picture_quad_image_filtering); |
CompositorFrameMetadata metadata; |
renderer_->SwapBuffers(metadata); |
- for (std::set<SurfaceId>::iterator it = contained_surfaces_.begin(); |
- it != contained_surfaces_.end(); |
+ for (base::hash_map<SurfaceId, int>::iterator it = |
+ aggregator_->previous_contained_surfaces().begin(); |
+ it != aggregator_->previous_contained_surfaces().end(); |
++it) { |
- Surface* surface = manager_->GetSurfaceForId(*it); |
+ Surface* surface = manager_->GetSurfaceForId(it->first); |
if (surface) |
surface->RunDrawCallbacks(); |
} |
@@ -127,7 +126,9 @@ bool Display::Draw() { |
} |
void Display::OnSurfaceDamaged(SurfaceId surface) { |
- if (contained_surfaces_.find(surface) != contained_surfaces_.end()) |
+ if (aggregator_ && |
+ aggregator_->previous_contained_surfaces().find(surface) != |
+ aggregator_->previous_contained_surfaces().end()) |
client_->DisplayDamaged(); |
} |