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

Unified Diff: components/mus/gpu/gpu_service_impl.h

Issue 1976703003: Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/gpu/gpu_memory_buffer_manager_mus_local.cc ('k') | components/mus/gpu/gpu_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gpu/gpu_service_impl.h
diff --git a/components/mus/gpu/gpu_service_impl.h b/components/mus/gpu/gpu_service_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..91045873c23459fd64377b19d1cfd32ad254a742
--- /dev/null
+++ b/components/mus/gpu/gpu_service_impl.h
@@ -0,0 +1,60 @@
+// 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 COMPONENTS_MUS_GPU_GPU_SERVICE_IMPL_H_
+#define COMPONENTS_MUS_GPU_GPU_SERVICE_IMPL_H_
+
+#include "components/mus/public/interfaces/gpu_memory_buffer.mojom.h"
+#include "components/mus/public/interfaces/gpu_service.mojom.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+
+namespace shell {
+class Connection;
+}
+
+namespace mus {
+
+class GpuServiceImpl : public mojom::GpuService {
+ public:
+ GpuServiceImpl(mojo::InterfaceRequest<mojom::GpuService> request,
+ shell::Connection* connection);
+ ~GpuServiceImpl() override;
+
+ // mojom::GpuService overrides:
+ void EstablishGpuChannel(
+ const mojom::GpuService::EstablishGpuChannelCallback& callback) override;
+
+ void CreateGpuMemoryBuffer(
+ mojom::GpuMemoryBufferIdPtr id,
+ const gfx::Size& size,
+ mojom::BufferFormat format,
+ mojom::BufferUsage usage,
+ uint64_t surface_id,
+ const mojom::GpuService::CreateGpuMemoryBufferCallback& callback)
+ override;
+
+ void CreateGpuMemoryBufferFromHandle(
+ mojom::GpuMemoryBufferHandlePtr buffer_handle,
+ mojom::GpuMemoryBufferIdPtr id,
+ const gfx::Size& size,
+ mojom::BufferFormat format,
+ const mojom::GpuService::CreateGpuMemoryBufferFromHandleCallback&
+ callback) override;
+
+ void DestroyGpuMemoryBuffer(mojom::GpuMemoryBufferIdPtr id,
+ const gpu::SyncToken& sync_token) override;
+
+ private:
+ mojo::StrongBinding<GpuService> binding_;
+
+ // A unique client id for constructing the GpuChannel.
+ const int32_t client_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(GpuServiceImpl);
+};
+
+} // namespace mus
+
+#endif // COMPONENTS_MUS_GPU_GPU_SERVICE_IMPL_H_
« no previous file with comments | « components/mus/gpu/gpu_memory_buffer_manager_mus_local.cc ('k') | components/mus/gpu/gpu_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698