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

Unified Diff: mojo/gpu/gl_context.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 years, 10 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 | « mojo/gpu/gl_context.h ('k') | mojo/public/cpp/application/application_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/gpu/gl_context.cc
diff --git a/mojo/gpu/gl_context.cc b/mojo/gpu/gl_context.cc
index ec7afa5b23392ea73a46724ea6a7687cccfa9a05..4f1459554280ad32c434f8c17580e67b668fe678 100644
--- a/mojo/gpu/gl_context.cc
+++ b/mojo/gpu/gl_context.cc
@@ -12,12 +12,12 @@ namespace mojo {
GLContext::Observer::~Observer() {}
-GLContext::GLContext(CommandBufferPtr command_buffer) : weak_factory_(this) {
- context_ = MGLCreateContext(
- MGL_API_VERSION_GLES2,
- command_buffer.PassInterfaceHandle().PassHandle().release().value(),
- MGL_NO_CONTEXT, &ContextLostThunk, this,
- Environment::GetDefaultAsyncWaiter());
+GLContext::GLContext(InterfaceHandle<CommandBuffer> command_buffer)
+ : weak_factory_(this) {
+ context_ = MGLCreateContext(MGL_API_VERSION_GLES2,
+ command_buffer.PassHandle().release().value(),
+ MGL_NO_CONTEXT, &ContextLostThunk, this,
+ Environment::GetDefaultAsyncWaiter());
DCHECK(context_ != MGL_NO_CONTEXT);
}
@@ -32,13 +32,13 @@ base::WeakPtr<GLContext> GLContext::CreateOffscreen(
GetProxy(&native_viewport), nullptr);
GpuPtr gpu_service;
ConnectToService(native_viewport.get(), &gpu_service);
- CommandBufferPtr command_buffer;
+ InterfaceHandle<CommandBuffer> command_buffer;
gpu_service->CreateOffscreenGLES2Context(GetProxy(&command_buffer));
return CreateFromCommandBuffer(command_buffer.Pass());
}
base::WeakPtr<GLContext> GLContext::CreateFromCommandBuffer(
- CommandBufferPtr command_buffer) {
+ InterfaceHandle<CommandBuffer> command_buffer) {
return (new GLContext(command_buffer.Pass()))->weak_factory_.GetWeakPtr();
}
« no previous file with comments | « mojo/gpu/gl_context.h ('k') | mojo/public/cpp/application/application_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698