Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: ui/aura/mus/mus_context_factory.cc

Issue 2585653003: gpu: Move buffer format to target texture map into gpu host. (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/ipc/host/gpu_memory_buffer_support.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « gpu/ipc/host/gpu_memory_buffer_support.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698