| Index: cc/surfaces/surface_factory.cc
|
| diff --git a/cc/surfaces/surface_factory.cc b/cc/surfaces/surface_factory.cc
|
| index 12afab82e69b063d41b23ccd6282824a8ac6ee15..98b771c3836bfa88b2922d649452bd36233223f5 100644
|
| --- a/cc/surfaces/surface_factory.cc
|
| +++ b/cc/surfaces/surface_factory.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "cc/surfaces/surface_factory.h"
|
|
|
| +#include <utility>
|
| +
|
| #include "base/trace_event/trace_event.h"
|
| #include "cc/output/compositor_frame.h"
|
| #include "cc/output/copy_output_request.h"
|
| @@ -32,7 +34,7 @@ SurfaceFactory::~SurfaceFactory() {
|
|
|
| void SurfaceFactory::DestroyAll() {
|
| for (auto it = surface_map_.begin(); it != surface_map_.end(); ++it)
|
| - manager_->Destroy(surface_map_.take(it));
|
| + manager_->Destroy(std::move(it->second));
|
| surface_map_.clear();
|
| }
|
|
|
| @@ -40,14 +42,15 @@ void SurfaceFactory::Create(SurfaceId surface_id) {
|
| scoped_ptr<Surface> surface(new Surface(surface_id, this));
|
| manager_->RegisterSurface(surface.get());
|
| DCHECK(!surface_map_.count(surface_id));
|
| - surface_map_.add(surface_id, std::move(surface));
|
| + surface_map_[surface_id] = std::move(surface);
|
| }
|
|
|
| void SurfaceFactory::Destroy(SurfaceId surface_id) {
|
| OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
|
| DCHECK(it != surface_map_.end());
|
| DCHECK(it->second->factory().get() == this);
|
| - manager_->Destroy(surface_map_.take_and_erase(it));
|
| + manager_->Destroy(std::move(it->second));
|
| + surface_map_.erase(it);
|
| }
|
|
|
| void SurfaceFactory::SetBeginFrameSource(SurfaceId surface_id,
|
|
|