| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { | 182 cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { |
| 183 return &shared_bitmap_manager_; | 183 return &shared_bitmap_manager_; |
| 184 } | 184 } |
| 185 | 185 |
| 186 gpu::GpuMemoryBufferManager* | 186 gpu::GpuMemoryBufferManager* |
| 187 InProcessContextFactory::GetGpuMemoryBufferManager() { | 187 InProcessContextFactory::GetGpuMemoryBufferManager() { |
| 188 return &gpu_memory_buffer_manager_; | 188 return &gpu_memory_buffer_manager_; |
| 189 } | 189 } |
| 190 | 190 |
| 191 cc::TaskGraphRunner* InProcessContextFactory::GetTaskGraphRunner() { |
| 192 return &task_graph_runner_; |
| 193 } |
| 194 |
| 191 scoped_ptr<cc::SurfaceIdAllocator> | 195 scoped_ptr<cc::SurfaceIdAllocator> |
| 192 InProcessContextFactory::CreateSurfaceIdAllocator() { | 196 InProcessContextFactory::CreateSurfaceIdAllocator() { |
| 193 return make_scoped_ptr( | 197 return make_scoped_ptr( |
| 194 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | 198 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
| 195 } | 199 } |
| 196 | 200 |
| 197 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, | 201 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, |
| 198 const gfx::Size& size) { | 202 const gfx::Size& size) { |
| 199 if (!per_compositor_data_.count(compositor)) | 203 if (!per_compositor_data_.count(compositor)) |
| 200 return; | 204 return; |
| 201 per_compositor_data_[compositor]->display()->Resize(size); | 205 per_compositor_data_[compositor]->display()->Resize(size); |
| 202 } | 206 } |
| 203 | 207 |
| 204 } // namespace ui | 208 } // namespace ui |
| OLD | NEW |