OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/mus/stub_context_factory.h" | 5 #include "ash/mus/stub_context_factory.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "cc/output/context_provider.h" | 8 #include "cc/output/context_provider.h" |
8 #include "cc/raster/single_thread_task_graph_runner.h" | 9 #include "cc/raster/single_thread_task_graph_runner.h" |
9 #include "cc/surfaces/surface_id_allocator.h" | 10 #include "cc/surfaces/surface_id_allocator.h" |
10 #include "third_party/khronos/GLES2/gl2.h" | 11 #include "third_party/khronos/GLES2/gl2.h" |
11 #include "ui/compositor/reflector.h" | 12 #include "ui/compositor/reflector.h" |
12 | 13 |
13 namespace ash { | 14 namespace ash { |
14 namespace sysui { | 15 namespace sysui { |
15 | 16 |
16 namespace { | 17 namespace { |
(...skipping 10 matching lines...) Expand all Loading... |
27 | 28 |
28 StubContextFactory::StubContextFactory() | 29 StubContextFactory::StubContextFactory() |
29 : next_surface_id_namespace_(1u), | 30 : next_surface_id_namespace_(1u), |
30 task_graph_runner_(new StubTaskGraphRunner) {} | 31 task_graph_runner_(new StubTaskGraphRunner) {} |
31 | 32 |
32 StubContextFactory::~StubContextFactory() {} | 33 StubContextFactory::~StubContextFactory() {} |
33 | 34 |
34 void StubContextFactory::CreateOutputSurface( | 35 void StubContextFactory::CreateOutputSurface( |
35 base::WeakPtr<ui::Compositor> compositor) {} | 36 base::WeakPtr<ui::Compositor> compositor) {} |
36 | 37 |
37 scoped_ptr<ui::Reflector> StubContextFactory::CreateReflector( | 38 std::unique_ptr<ui::Reflector> StubContextFactory::CreateReflector( |
38 ui::Compositor* mirrored_compositor, | 39 ui::Compositor* mirrored_compositor, |
39 ui::Layer* mirroring_layer) { | 40 ui::Layer* mirroring_layer) { |
40 return nullptr; | 41 return nullptr; |
41 } | 42 } |
42 | 43 |
43 void StubContextFactory::RemoveReflector(ui::Reflector* reflector) {} | 44 void StubContextFactory::RemoveReflector(ui::Reflector* reflector) {} |
44 | 45 |
45 scoped_refptr<cc::ContextProvider> | 46 scoped_refptr<cc::ContextProvider> |
46 StubContextFactory::SharedMainThreadContextProvider() { | 47 StubContextFactory::SharedMainThreadContextProvider() { |
47 return nullptr; | 48 return nullptr; |
(...skipping 15 matching lines...) Expand all Loading... |
63 } | 64 } |
64 | 65 |
65 gpu::GpuMemoryBufferManager* StubContextFactory::GetGpuMemoryBufferManager() { | 66 gpu::GpuMemoryBufferManager* StubContextFactory::GetGpuMemoryBufferManager() { |
66 return nullptr; | 67 return nullptr; |
67 } | 68 } |
68 | 69 |
69 cc::TaskGraphRunner* StubContextFactory::GetTaskGraphRunner() { | 70 cc::TaskGraphRunner* StubContextFactory::GetTaskGraphRunner() { |
70 return task_graph_runner_.get(); | 71 return task_graph_runner_.get(); |
71 } | 72 } |
72 | 73 |
73 scoped_ptr<cc::SurfaceIdAllocator> | 74 std::unique_ptr<cc::SurfaceIdAllocator> |
74 StubContextFactory::CreateSurfaceIdAllocator() { | 75 StubContextFactory::CreateSurfaceIdAllocator() { |
75 return make_scoped_ptr( | 76 return base::WrapUnique( |
76 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | 77 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
77 } | 78 } |
78 | 79 |
79 void StubContextFactory::ResizeDisplay(ui::Compositor* compositor, | 80 void StubContextFactory::ResizeDisplay(ui::Compositor* compositor, |
80 const gfx::Size& size) {} | 81 const gfx::Size& size) {} |
81 | 82 |
82 } // namespace sysui | 83 } // namespace sysui |
83 } // namespace ash | 84 } // namespace ash |
OLD | NEW |