| Index: cc/surfaces/surface_manager.cc
|
| diff --git a/cc/surfaces/surface_manager.cc b/cc/surfaces/surface_manager.cc
|
| index 417b7691ca6a850b49e903fbf747495fc9019768..bdd8a4a721937215528bf38d9f4e1958b0d2a652 100644
|
| --- a/cc/surfaces/surface_manager.cc
|
| +++ b/cc/surfaces/surface_manager.cc
|
| @@ -76,17 +76,17 @@ void SurfaceManager::RequestSurfaceResolution(Surface* pending_surface) {
|
|
|
| std::unique_ptr<Surface> SurfaceManager::CreateSurface(
|
| base::WeakPtr<SurfaceFactory> surface_factory,
|
| - const LocalSurfaceId& local_surface_id) {
|
| + const SurfaceInfo& surface_info) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| - DCHECK(local_surface_id.is_valid() && surface_factory);
|
| -
|
| - SurfaceId surface_id(surface_factory->frame_sink_id(), local_surface_id);
|
| + DCHECK(surface_info.is_valid() && surface_factory);
|
| + DCHECK_EQ(surface_info.id().frame_sink_id(),
|
| + surface_factory->frame_sink_id());
|
|
|
| // If no surface with this SurfaceId exists, simply create the surface and
|
| // return.
|
| - auto surface_iter = surface_map_.find(surface_id);
|
| + auto surface_iter = surface_map_.find(surface_info.id());
|
| if (surface_iter == surface_map_.end()) {
|
| - auto surface = base::MakeUnique<Surface>(surface_id, surface_factory);
|
| + auto surface = base::MakeUnique<Surface>(surface_info, surface_factory);
|
| surface_map_[surface->surface_id()] = surface.get();
|
| return surface;
|
| }
|
| @@ -101,8 +101,8 @@ std::unique_ptr<Surface> SurfaceManager::CreateSurface(
|
| // the queue and reuse it.
|
| auto it =
|
| std::find_if(surfaces_to_destroy_.begin(), surfaces_to_destroy_.end(),
|
| - [&surface_id](const std::unique_ptr<Surface>& surface) {
|
| - return surface->surface_id() == surface_id;
|
| + [&surface_info](const std::unique_ptr<Surface>& surface) {
|
| + return surface->surface_id() == surface_info.id();
|
| });
|
| DCHECK(it != surfaces_to_destroy_.end());
|
| std::unique_ptr<Surface> surface = std::move(*it);
|
|
|