| Index: cc/surfaces/surface_factory.cc
|
| diff --git a/cc/surfaces/surface_factory.cc b/cc/surfaces/surface_factory.cc
|
| index ab7186a39b42181cc9f72174a281d19e565853a7..dcf1130c942b4dcefbbb0b34e39d85e4a9e869c5 100644
|
| --- a/cc/surfaces/surface_factory.cc
|
| +++ b/cc/surfaces/surface_factory.cc
|
| @@ -29,17 +29,26 @@ void SurfaceFactory::Create(SurfaceId surface_id, const gfx::Size& size) {
|
| void SurfaceFactory::Destroy(SurfaceId surface_id) {
|
| OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
|
| DCHECK(it != surface_map_.end());
|
| - DCHECK(it->second->factory() == this);
|
| + DCHECK(it->second->factory().get() == this);
|
| manager_->DeregisterSurface(surface_id);
|
| surface_map_.erase(it);
|
| }
|
|
|
| +void SurfaceFactory::DestroyOnSequence(
|
| + SurfaceId surface_id,
|
| + const std::set<SurfaceSequence>& dependency_set) {
|
| + OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
|
| + DCHECK(it != surface_map_.end());
|
| + DCHECK(it->second->factory().get() == this);
|
| + manager_->DestroyOnSequence(surface_map_.take_and_erase(it), dependency_set);
|
| +}
|
| +
|
| void SurfaceFactory::SubmitFrame(SurfaceId surface_id,
|
| scoped_ptr<CompositorFrame> frame,
|
| const base::Closure& callback) {
|
| OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
|
| DCHECK(it != surface_map_.end());
|
| - DCHECK(it->second->factory() == this);
|
| + DCHECK(it->second->factory().get() == this);
|
| it->second->QueueFrame(frame.Pass(), callback);
|
| manager_->SurfaceModified(surface_id);
|
| }
|
| @@ -52,7 +61,7 @@ void SurfaceFactory::RequestCopyOfSurface(
|
| copy_request->SendEmptyResult();
|
| return;
|
| }
|
| - DCHECK(it->second->factory() == this);
|
| + DCHECK(it->second->factory().get() == this);
|
| it->second->RequestCopyOfOutput(copy_request.Pass());
|
| manager_->SurfaceModified(surface_id);
|
| }
|
|
|