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

Unified Diff: components/mus/public/cpp/lib/context_provider.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: Update Created 4 years, 7 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/public/cpp/gles2_context.h ('k') | components/mus/public/cpp/lib/gles2_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/cpp/lib/context_provider.cc
diff --git a/components/mus/public/cpp/lib/context_provider.cc b/components/mus/public/cpp/lib/context_provider.cc
index 4ee50263c9c5e79092fcbd798e7597cb05222a64..83a2c2bfba2a82717bea1e8dd2954ebf3db9ea8b 100644
--- a/components/mus/public/cpp/lib/context_provider.cc
+++ b/components/mus/public/cpp/lib/context_provider.cc
@@ -11,20 +11,12 @@
namespace mus {
-ContextProvider::ContextProvider(
- mojo::ScopedMessagePipeHandle command_buffer_handle)
- : command_buffer_handle_(std::move(command_buffer_handle)),
- context_(nullptr) {
-}
+ContextProvider::ContextProvider(shell::Connector* connector)
+ : connector_(connector) {}
bool ContextProvider::BindToCurrentThread() {
- mojom::CommandBufferPtr command_buffer_ptr;
- command_buffer_ptr.Bind(mojo::InterfacePtrInfo<mus::mojom::CommandBuffer>(
- std::move(command_buffer_handle_), 0u));
- std::unique_ptr<GLES2Context> context(
- new GLES2Context(std::vector<int32_t>(), std::move(command_buffer_ptr)));
- if (context->Initialize())
- context_ = std::move(context);
+ context_ =
+ GLES2Context::CreateOffscreenContext(std::vector<int32_t>(), connector_);
sadrul 2016/06/01 19:16:57 Note that if |connector_| is coming from a differe
Peng 2016/06/01 20:00:42 Good catch. Done.
return !!context_;
}
« no previous file with comments | « components/mus/public/cpp/gles2_context.h ('k') | components/mus/public/cpp/lib/gles2_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698