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

Unified Diff: services/ui/gpu/gpu_service_internal.h

Issue 2539893002: Mus: Implement GpuMain mojo interface (Closed)
Patch Set: Addressed Sadrul's comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/gpu/gpu_main.cc ('k') | services/ui/gpu/gpu_service_internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/gpu/gpu_service_internal.h
diff --git a/services/ui/gpu/gpu_service_internal.h b/services/ui/gpu/gpu_service_internal.h
index ca199970cff615e8a6de064b0a9345fd27adba68..f6b3c600cde9ee0ef66d037cfe2e906c2ceb7452 100644
--- a/services/ui/gpu/gpu_service_internal.h
+++ b/services/ui/gpu/gpu_service_internal.h
@@ -10,6 +10,7 @@
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
+#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
#include "gpu/command_buffer/service/gpu_preferences.h"
#include "gpu/config/gpu_info.h"
#include "gpu/ipc/common/surface_handle.h"
@@ -21,7 +22,6 @@
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h"
-#include "services/ui/surfaces/display_compositor.h"
#include "ui/gfx/native_widget_types.h"
namespace gpu {
@@ -46,22 +46,18 @@ class GpuServiceInternal : public gpu::GpuChannelManagerDelegate,
public mojom::GpuServiceInternal,
public base::NonThreadSafe {
public:
- ~GpuServiceInternal() override;
+ GpuServiceInternal(const gpu::GPUInfo& gpu_info,
+ std::unique_ptr<gpu::GpuWatchdogThread> watchdog,
+ gpu::GpuMemoryBufferFactory* memory_buffer_factory,
+ scoped_refptr<base::SingleThreadTaskRunner> io_runner);
- void Add(mojom::GpuServiceInternalRequest request);
+ ~GpuServiceInternal() override;
- void DestroyDisplayCompositor();
+ void Bind(mojom::GpuServiceInternalRequest request);
private:
friend class GpuMain;
- GpuServiceInternal(
- const gpu::GPUInfo& gpu_info,
- std::unique_ptr<gpu::GpuWatchdogThread> watchdog,
- gpu::GpuMemoryBufferFactory* memory_buffer_factory,
- scoped_refptr<base::SingleThreadTaskRunner> io_runner,
- scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner);
-
gfx::GpuMemoryBufferHandle CreateGpuMemoryBufferFromeHandle(
gfx::GpuMemoryBufferHandle buffer_handle,
gfx::GpuMemoryBufferId id,
@@ -69,6 +65,20 @@ class GpuServiceInternal : public gpu::GpuChannelManagerDelegate,
gfx::BufferFormat format,
int client_id);
+ gpu::SyncPointManager* sync_point_manager() {
+ return owned_sync_point_manager_.get();
+ }
+
+ gpu::gles2::MailboxManager* mailbox_manager() {
+ return gpu_channel_manager_->mailbox_manager();
+ }
+
+ gl::GLShareGroup* share_group() {
+ return gpu_channel_manager_->share_group();
+ }
+
+ const gpu::GPUInfo& gpu_info() const { return gpu_info_; }
+
// gpu::GpuChannelManagerDelegate:
void DidCreateOffscreenContext(const GURL& active_url) override;
void DidDestroyChannel(int client_id) override;
@@ -85,9 +95,9 @@ class GpuServiceInternal : public gpu::GpuChannelManagerDelegate,
gpu::SurfaceHandle child_window) override;
#endif
void SetActiveURL(const GURL& url) override;
+ void Initialize();
// mojom::GpuServiceInternal:
- void Initialize(const InitializeCallback& callback) override;
void EstablishGpuChannel(
int32_t client_id,
uint64_t client_tracing_id,
@@ -104,19 +114,8 @@ class GpuServiceInternal : public gpu::GpuChannelManagerDelegate,
void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
int client_id,
const gpu::SyncToken& sync_token) override;
- void CreateDisplayCompositor(
- cc::mojom::DisplayCompositorRequest request,
- cc::mojom::DisplayCompositorClientPtr client) override;
-
- void CreateDisplayCompositorOnCompositorThread(
- mojom::GpuServiceInternalPtrInfo gpu_service_info,
- cc::mojom::DisplayCompositorRequest request,
- cc::mojom::DisplayCompositorClientPtrInfo client_info);
-
- void DestroyDisplayCompositorOnCompositorThread();
scoped_refptr<base::SingleThreadTaskRunner> io_runner_;
- scoped_refptr<base::SingleThreadTaskRunner> compositor_runner_;
// An event that will be signalled when we shutdown.
base::WaitableEvent shutdown_event_;
@@ -130,13 +129,6 @@ class GpuServiceInternal : public gpu::GpuChannelManagerDelegate,
// Information about the GPU, such as device and vendor ID.
gpu::GPUInfo gpu_info_;
- std::unique_ptr<ui::DisplayCompositor> display_compositor_;
-
- // The message-pipe used by the DisplayCompositor to request gpu memory
- // buffers.
- mojom::GpuServiceInternalPtr gpu_internal_;
-
- scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service_;
std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_;
std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_;
std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_;
« no previous file with comments | « services/ui/gpu/gpu_main.cc ('k') | services/ui/gpu/gpu_service_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698