| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/compositor/test/in_process_context_factory.h" | 5 #include "ui/compositor/test/in_process_context_factory.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 std::unique_ptr<cc::SurfaceIdAllocator> | 246 std::unique_ptr<cc::SurfaceIdAllocator> |
| 247 InProcessContextFactory::CreateSurfaceIdAllocator() { | 247 InProcessContextFactory::CreateSurfaceIdAllocator() { |
| 248 std::unique_ptr<cc::SurfaceIdAllocator> allocator( | 248 std::unique_ptr<cc::SurfaceIdAllocator> allocator( |
| 249 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | 249 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
| 250 if (surface_manager_) | 250 if (surface_manager_) |
| 251 allocator->RegisterSurfaceIdNamespace(surface_manager_); | 251 allocator->RegisterSurfaceIdNamespace(surface_manager_); |
| 252 return allocator; | 252 return allocator; |
| 253 } | 253 } |
| 254 | 254 |
| 255 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() { |
| 256 return surface_manager_; |
| 257 } |
| 258 |
| 255 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, | 259 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, |
| 256 const gfx::Size& size) { | 260 const gfx::Size& size) { |
| 257 if (!per_compositor_data_.count(compositor)) | 261 if (!per_compositor_data_.count(compositor)) |
| 258 return; | 262 return; |
| 259 per_compositor_data_[compositor]->display()->Resize(size); | 263 per_compositor_data_[compositor]->display()->Resize(size); |
| 260 } | 264 } |
| 261 | 265 |
| 262 } // namespace ui | 266 } // namespace ui |
| OLD | NEW |