Chromium Code Reviews| Index: cc/surfaces/surface.cc |
| diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc |
| index 55c7392249806d90cb8f81c1b6d030e3043b8632..c7e44a6e2ceea57667d601b96d617ada8beb0272 100644 |
| --- a/cc/surfaces/surface.cc |
| +++ b/cc/surfaces/surface.cc |
| @@ -5,6 +5,7 @@ |
| #include "cc/surfaces/surface.h" |
| #include "cc/output/compositor_frame.h" |
| +#include "cc/surfaces/display.h" |
| #include "cc/surfaces/surface_factory.h" |
| namespace cc { |
| @@ -14,6 +15,11 @@ Surface::Surface(SurfaceId id, const gfx::Size& size, SurfaceFactory* factory) |
| } |
| Surface::~Surface() { |
| + for (std::set<Display*>::iterator it = containing_displays_.begin(); |
|
jamesr
2014/08/07 21:04:06
if you used IDs then you wouldn't need to do this
|
| + it != containing_displays_.end(); |
| + ++it) { |
| + (*it)->contained_surfaces().erase(this); |
| + } |
| if (current_frame_) { |
| ReturnedResourceArray current_resources; |
| TransferableResource::ReturnResources( |
| @@ -36,6 +42,11 @@ void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame) { |
| &previous_resources); |
| factory_->UnrefResources(previous_resources); |
| } |
| + for (std::set<Display*>::iterator it = containing_displays_.begin(); |
| + it != containing_displays_.end(); |
| + ++it) { |
| + (*it)->Draw(); |
|
jamesr
2014/08/07 21:04:06
i think the service should be keeping track of thi
|
| + } |
| } |
| const CompositorFrame* Surface::GetEligibleFrame() { |