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

Side by Side Diff: services/ui/ws/gpu_host.cc

Issue 2934203002: exp/wip: Use ServerGpuMemoryBufferManager in browser.
Patch Set: . Created 3 years, 6 months 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 | « services/ui/ws/gpu_host.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "services/ui/ws/gpu_host.h" 5 #include "services/ui/ws/gpu_host.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // TODO(sad): Correctly initialize gpu::GpuPreferences (like it is initialized 45 // TODO(sad): Correctly initialize gpu::GpuPreferences (like it is initialized
46 // in GpuProcessHost::Init()). 46 // in GpuProcessHost::Init()).
47 gpu::GpuPreferences preferences; 47 gpu::GpuPreferences preferences;
48 mojom::GpuHostPtr gpu_host_proxy; 48 mojom::GpuHostPtr gpu_host_proxy;
49 gpu_host_binding_.Bind(mojo::MakeRequest(&gpu_host_proxy)); 49 gpu_host_binding_.Bind(mojo::MakeRequest(&gpu_host_proxy));
50 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_), 50 gpu_main_->CreateGpuService(MakeRequest(&gpu_service_),
51 std::move(gpu_host_proxy), preferences, 51 std::move(gpu_host_proxy), preferences,
52 mojo::ScopedSharedBufferHandle()); 52 mojo::ScopedSharedBufferHandle());
53 gpu_memory_buffer_manager_ = 53 gpu_memory_buffer_manager_ =
54 base::MakeUnique<viz::ServerGpuMemoryBufferManager>(gpu_service_.get(), 54 base::MakeRefCounted<viz::ServerGpuMemoryBufferManager>(
55 next_client_id_++); 55 gpu_service_.get(), next_client_id_++);
56 } 56 }
57 57
58 DefaultGpuHost::~DefaultGpuHost() {} 58 DefaultGpuHost::~DefaultGpuHost() {}
59 59
60 void DefaultGpuHost::Add(mojom::GpuRequest request) { 60 void DefaultGpuHost::Add(mojom::GpuRequest request) {
61 AddInternal(std::move(request)); 61 AddInternal(std::move(request));
62 } 62 }
63 63
64 void DefaultGpuHost::OnAcceleratedWidgetAvailable( 64 void DefaultGpuHost::OnAcceleratedWidgetAvailable(
65 gfx::AcceleratedWidget widget) { 65 gfx::AcceleratedWidget widget) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void DefaultGpuHost::StoreShaderToDisk(int32_t client_id, 140 void DefaultGpuHost::StoreShaderToDisk(int32_t client_id,
141 const std::string& key, 141 const std::string& key,
142 const std::string& shader) {} 142 const std::string& shader) {}
143 143
144 void DefaultGpuHost::RecordLogMessage(int32_t severity, 144 void DefaultGpuHost::RecordLogMessage(int32_t severity,
145 const std::string& header, 145 const std::string& header,
146 const std::string& message) {} 146 const std::string& message) {}
147 147
148 } // namespace ws 148 } // namespace ws
149 } // namespace ui 149 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/gpu_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698