| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/aura/mus/mus_context_factory.h" | 5 #include "ui/aura/mus/mus_context_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "services/ui/public/cpp/context_provider.h" | 8 #include "services/ui/public/cpp/context_provider.h" |
| 9 #include "services/ui/public/cpp/gpu/gpu.h" | 9 #include "services/ui/public/cpp/gpu/gpu.h" |
| 10 #include "ui/aura/mus/window_port_mus.h" | 10 #include "ui/aura/mus/window_port_mus.h" |
| 11 #include "ui/aura/window_tree_host.h" | 11 #include "ui/aura/window_tree_host.h" |
| 12 #include "ui/gl/gl_bindings.h" | 12 #include "ui/gl/gl_bindings.h" |
| 13 | 13 |
| 14 namespace aura { | 14 namespace aura { |
| 15 namespace { | |
| 16 | |
| 17 | |
| 18 } // namespace | |
| 19 | 15 |
| 20 MusContextFactory::MusContextFactory(ui::Gpu* gpu) : gpu_(gpu) {} | 16 MusContextFactory::MusContextFactory(ui::Gpu* gpu) : gpu_(gpu) {} |
| 21 | 17 |
| 22 MusContextFactory::~MusContextFactory() {} | 18 MusContextFactory::~MusContextFactory() {} |
| 23 | 19 |
| 24 void MusContextFactory::CreateCompositorFrameSink( | 20 void MusContextFactory::CreateCompositorFrameSink( |
| 25 base::WeakPtr<ui::Compositor> compositor) { | 21 base::WeakPtr<ui::Compositor> compositor) { |
| 26 WindowTreeHost* host = | 22 WindowTreeHost* host = |
| 27 WindowTreeHost::GetForAcceleratedWidget(compositor->widget()); | 23 WindowTreeHost::GetForAcceleratedWidget(compositor->widget()); |
| 28 WindowPortMus* window_port = WindowPortMus::Get(host->window()); | 24 WindowPortMus* window_port = WindowPortMus::Get(host->window()); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 44 void MusContextFactory::RemoveCompositor(ui::Compositor* compositor) { | 40 void MusContextFactory::RemoveCompositor(ui::Compositor* compositor) { |
| 45 // NOTIMPLEMENTED(); | 41 // NOTIMPLEMENTED(); |
| 46 } | 42 } |
| 47 | 43 |
| 48 bool MusContextFactory::DoesCreateTestContexts() { | 44 bool MusContextFactory::DoesCreateTestContexts() { |
| 49 return false; | 45 return false; |
| 50 } | 46 } |
| 51 | 47 |
| 52 uint32_t MusContextFactory::GetImageTextureTarget(gfx::BufferFormat format, | 48 uint32_t MusContextFactory::GetImageTextureTarget(gfx::BufferFormat format, |
| 53 gfx::BufferUsage usage) { | 49 gfx::BufferUsage usage) { |
| 54 // No GpuMemoryBuffer support, so just return GL_TEXTURE_2D. | 50 // TODO(sad): http://crbug.com/675431 |
| 55 return GL_TEXTURE_2D; | 51 return GL_TEXTURE_2D; |
| 56 } | 52 } |
| 57 | 53 |
| 58 gpu::GpuMemoryBufferManager* MusContextFactory::GetGpuMemoryBufferManager() { | 54 gpu::GpuMemoryBufferManager* MusContextFactory::GetGpuMemoryBufferManager() { |
| 59 return gpu_->gpu_memory_buffer_manager(); | 55 return gpu_->gpu_memory_buffer_manager(); |
| 60 } | 56 } |
| 61 | 57 |
| 62 cc::TaskGraphRunner* MusContextFactory::GetTaskGraphRunner() { | 58 cc::TaskGraphRunner* MusContextFactory::GetTaskGraphRunner() { |
| 63 return raster_thread_helper_.task_graph_runner(); | 59 return raster_thread_helper_.task_graph_runner(); |
| 64 } | 60 } |
| 65 | 61 |
| 66 } // namespace aura | 62 } // namespace aura |
| OLD | NEW |