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

Unified Diff: services/ui/common/gpu_service.h

Issue 2184943002: services/ui: Move some files into the client lib. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome-gpu-in-mus-windows
Patch Set: . Created 4 years, 4 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 | « services/ui/common/gpu_memory_buffer_impl.cc ('k') | services/ui/common/gpu_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/common/gpu_service.h
diff --git a/services/ui/common/gpu_service.h b/services/ui/common/gpu_service.h
deleted file mode 100644
index 2a224d2fb85c0ef87a06884a1f8353f2fc694920..0000000000000000000000000000000000000000
--- a/services/ui/common/gpu_service.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_UI_COMMON_GPU_SERVICE_H_
-#define SERVICES_UI_COMMON_GPU_SERVICE_H_
-
-#include <stdint.h>
-#include <vector>
-
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/single_thread_task_runner.h"
-#include "base/synchronization/lock.h"
-#include "base/synchronization/waitable_event.h"
-#include "base/threading/thread.h"
-#include "gpu/ipc/client/gpu_channel_host.h"
-#include "services/ui/common/mojo_gpu_memory_buffer_manager.h"
-#include "services/ui/common/mus_common_export.h"
-#include "services/ui/public/interfaces/gpu_service.mojom.h"
-
-namespace shell {
-class Connector;
-}
-
-namespace ui {
-
-class MUS_COMMON_EXPORT GpuService : public gpu::GpuChannelHostFactory,
- public gpu::GpuChannelEstablishFactory {
- public:
- ~GpuService() override;
-
- gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const {
- return gpu_memory_buffer_manager_.get();
- }
-
- // The GpuService has to be initialized in the main thread before establishing
- // the gpu channel.
- static std::unique_ptr<GpuService> Initialize(shell::Connector* connector);
-
- // gpu::GpuChannelEstablishFactory:
- void EstablishGpuChannel(
- const gpu::GpuChannelEstablishedCallback& callback) override;
- scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override;
-
- private:
- friend struct base::DefaultSingletonTraits<GpuService>;
-
- explicit GpuService(shell::Connector* connector);
-
- scoped_refptr<gpu::GpuChannelHost> GetGpuChannelLocked();
- void EstablishGpuChannelOnMainThread();
- void EstablishGpuChannelOnMainThreadSyncLocked();
- void EstablishGpuChannelOnMainThreadDone(
- bool locked,
- int client_id,
- mojom::ChannelHandlePtr channel_handle,
- mojom::GpuInfoPtr gpu_info);
-
- // gpu::GpuChannelHostFactory overrides:
- bool IsMainThread() override;
- scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
- std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
- size_t size) override;
-
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
- shell::Connector* connector_;
- base::WaitableEvent shutdown_event_;
- base::Thread io_thread_;
- std::unique_ptr<MojoGpuMemoryBufferManager> gpu_memory_buffer_manager_;
-
- // Lock for |gpu_channel_|, |establish_callbacks_| & |is_establishing_|.
- base::Lock lock_;
- bool is_establishing_;
- ui::mojom::GpuServicePtr gpu_service_;
- scoped_refptr<gpu::GpuChannelHost> gpu_channel_;
- std::vector<gpu::GpuChannelEstablishedCallback> establish_callbacks_;
- base::ConditionVariable establishing_condition_;
-
- DISALLOW_COPY_AND_ASSIGN(GpuService);
-};
-
-} // namespace ui
-
-#endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_GPU_SERVICE_CONNECTION_H_
« no previous file with comments | « services/ui/common/gpu_memory_buffer_impl.cc ('k') | services/ui/common/gpu_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698