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

Unified Diff: mojo/gpu/gl_context.cc

Issue 845593003: Pass ServiceProvider and ServiceProvider& params in Connect (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: services & exposed_services Created 5 years, 11 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
Index: mojo/gpu/gl_context.cc
diff --git a/mojo/gpu/gl_context.cc b/mojo/gpu/gl_context.cc
index ab964075d4b83c0725203995ffe9e24aea509323..21ca36d377d21f2fb8d2e8453b79332efc8a747d 100644
--- a/mojo/gpu/gl_context.cc
+++ b/mojo/gpu/gl_context.cc
@@ -13,17 +13,17 @@ namespace mojo {
GLContext::Observer::~Observer() {
}
-GLContext::GLContext(mojo::Shell* shell) : weak_factory_(this) {
- mojo::ServiceProviderPtr native_viewport;
+GLContext::GLContext(Shell* shell) : weak_factory_(this) {
+ ServiceProviderPtr native_viewport;
shell->ConnectToApplication("mojo:native_viewport_service",
- mojo::GetProxy(&native_viewport));
- mojo::GpuPtr gpu_service;
- mojo::ConnectToService(native_viewport.get(), &gpu_service);
- mojo::CommandBufferPtr command_buffer;
- gpu_service->CreateOffscreenGLES2Context(mojo::GetProxy(&command_buffer));
+ GetProxy(&native_viewport), ServiceProviderPtr());
+ GpuPtr gpu_service;
+ ConnectToService(native_viewport.get(), &gpu_service);
+ CommandBufferPtr command_buffer;
+ gpu_service->CreateOffscreenGLES2Context(GetProxy(&command_buffer));
context_ = MojoGLES2CreateContext(
command_buffer.PassMessagePipe().release().value(), &ContextLostThunk,
- this, mojo::Environment::GetDefaultAsyncWaiter());
+ this, Environment::GetDefaultAsyncWaiter());
gl_ = static_cast<gpu::gles2::GLES2Interface*>(
MojoGLES2GetGLES2Interface(context_));
}
@@ -32,7 +32,7 @@ GLContext::~GLContext() {
MojoGLES2DestroyContext(context_);
}
-base::WeakPtr<GLContext> GLContext::Create(mojo::Shell* shell) {
+base::WeakPtr<GLContext> GLContext::Create(Shell* shell) {
return (new GLContext(shell))->weak_factory_.GetWeakPtr();
}

Powered by Google App Engine
This is Rietveld 408576698