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

Side by Side Diff: services/ui/common/gpu_service.cc

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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/common/gpu_service.h ('k') | services/ui/common/gpu_type_converters.h » ('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 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 "components/mus/common/gpu_service.h" 5 #include "services/ui/common/gpu_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "components/mus/common/gpu_type_converters.h"
12 #include "components/mus/common/switches.h"
13 #include "components/mus/public/interfaces/gpu_service.mojom.h"
14 #include "mojo/public/cpp/bindings/sync_call_restrictions.h" 11 #include "mojo/public/cpp/bindings/sync_call_restrictions.h"
15 #include "mojo/public/cpp/system/platform_handle.h" 12 #include "mojo/public/cpp/system/platform_handle.h"
16 #include "services/shell/public/cpp/connector.h" 13 #include "services/shell/public/cpp/connector.h"
14 #include "services/ui/common/gpu_type_converters.h"
15 #include "services/ui/common/mojo_gpu_memory_buffer_manager.h"
16 #include "services/ui/common/switches.h"
17 #include "services/ui/public/interfaces/gpu_service.mojom.h"
17 18
18 namespace mus { 19 namespace mus {
19 20
20 namespace { 21 namespace {
21 22
22 void PostTask(scoped_refptr<base::SingleThreadTaskRunner> runner, 23 void PostTask(scoped_refptr<base::SingleThreadTaskRunner> runner,
23 const tracked_objects::Location& from_here, 24 const tracked_objects::Location& from_here,
24 const base::Closure& callback) { 25 const base::Closure& callback) {
25 runner->PostTask(from_here, callback); 26 runner->PostTask(from_here, callback);
26 } 27 }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 MojoResult result = mojo::UnwrapSharedMemoryHandle( 248 MojoResult result = mojo::UnwrapSharedMemoryHandle(
248 std::move(handle), &platform_handle, &shared_memory_size, &readonly); 249 std::move(handle), &platform_handle, &shared_memory_size, &readonly);
249 if (result != MOJO_RESULT_OK) 250 if (result != MOJO_RESULT_OK)
250 return nullptr; 251 return nullptr;
251 DCHECK_EQ(shared_memory_size, size); 252 DCHECK_EQ(shared_memory_size, size);
252 253
253 return base::MakeUnique<base::SharedMemory>(platform_handle, readonly); 254 return base::MakeUnique<base::SharedMemory>(platform_handle, readonly);
254 } 255 }
255 256
256 } // namespace mus 257 } // namespace mus
OLDNEW
« no previous file with comments | « services/ui/common/gpu_service.h ('k') | services/ui/common/gpu_type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698