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

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

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/common/gpu_type_converters.h ('k') | components/mus/common/switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/common/gpu_type_converters.cc
diff --git a/components/mus/common/gpu_type_converters.cc b/components/mus/common/gpu_type_converters.cc
index 9fdc622b10a418ff551e166ddef48095e77ed427..7733c7d3bf7e5d51ebd95afcdba9d865ae18541c 100644
--- a/components/mus/common/gpu_type_converters.cc
+++ b/components/mus/common/gpu_type_converters.cc
@@ -5,6 +5,7 @@
#include "components/mus/common/gpu_type_converters.h"
#include "build/build_config.h"
+#include "gpu/config/gpu_info.h"
#include "ipc/ipc_channel_handle.h"
#include "mojo/public/cpp/system/platform_handle.h"
#include "ui/gfx/gpu_memory_buffer.h"
@@ -146,4 +147,18 @@ gfx::GpuMemoryBufferHandle TypeConverter<gfx::GpuMemoryBufferHandle,
return result;
}
+// static
+mus::mojom::GpuInfoPtr
+TypeConverter<mus::mojom::GpuInfoPtr, gpu::GPUInfo>::Convert(
+ const gpu::GPUInfo& input) {
+ mus::mojom::GpuInfoPtr result(mus::mojom::GpuInfo::New());
+ result->vendor_id = input.gpu.vendor_id;
+ result->device_id = input.gpu.device_id;
+ result->vendor_info = mojo::String::From<std::string>(input.gl_vendor);
+ result->renderer_info = mojo::String::From<std::string>(input.gl_renderer);
+ result->driver_version =
+ mojo::String::From<std::string>(input.driver_version);
+ return result;
+}
+
} // namespace mojo
« no previous file with comments | « components/mus/common/gpu_type_converters.h ('k') | components/mus/common/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698