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

Unified Diff: components/mus/common/gpu_service.cc

Issue 2020293003: Use mus::MojoGpuMemoryBufferManager in mus::GpuService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/common/gpu_service.h ('k') | components/mus/common/mojo_buffer_backing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/common/gpu_service.cc
diff --git a/components/mus/public/cpp/lib/gpu_service.cc b/components/mus/common/gpu_service.cc
similarity index 93%
rename from components/mus/public/cpp/lib/gpu_service.cc
rename to components/mus/common/gpu_service.cc
index 7e7c253046b5189e6457c21da409173dca3436ee..7cae194fc7827cb28a9135597a9e28d870f4e58f 100644
--- a/components/mus/public/cpp/lib/gpu_service.cc
+++ b/components/mus/common/gpu_service.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/mus/public/cpp/lib/gpu_service.h"
+#include "components/mus/common/gpu_service.h"
#include "base/command_line.h"
#include "base/memory/singleton.h"
#include "components/mus/common/gpu_type_converters.h"
+#include "components/mus/common/mojo_gpu_memory_buffer_manager.h"
#include "components/mus/common/switches.h"
-#include "components/mus/public/cpp/lib/gpu_memory_buffer_manager_mus.h"
#include "components/mus/public/interfaces/gpu_service.mojom.h"
#include "services/shell/public/cpp/connector.h"
@@ -32,7 +32,7 @@ GpuService::GpuService()
: main_message_loop_(base::MessageLoop::current()),
shutdown_event_(false, false),
io_thread_("GPUIOThread"),
- gpu_memory_buffer_manager_(new mus::GpuMemoryBufferManagerMus) {
+ gpu_memory_buffer_manager_(new MojoGpuMemoryBufferManager) {
base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
thread_options.priority = base::ThreadPriority::NORMAL;
CHECK(io_thread_.StartWithOptions(thread_options));
@@ -54,6 +54,7 @@ GpuService* GpuService::GetInstance() {
scoped_refptr<gpu::GpuChannelHost> GpuService::EstablishGpuChannel(
shell::Connector* connector) {
+ base::AutoLock auto_lock(lock_);
if (gpu_channel_ && gpu_channel_->IsLost()) {
gpu_channel_->DestroyChannel();
gpu_channel_ = nullptr;
« no previous file with comments | « components/mus/common/gpu_service.h ('k') | components/mus/common/mojo_buffer_backing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698