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

Side by Side Diff: mojo/gpu/gl_context.cc

Issue 2034383003: Removed exposed_services from mojom definitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/gpu/gl_context.h" 5 #include "mojo/gpu/gl_context.h"
6 6
7 #include "mojo/public/cpp/application/connect.h" 7 #include "mojo/public/cpp/application/connect.h"
8 #include "mojo/public/interfaces/application/application_connector.mojom.h" 8 #include "mojo/public/interfaces/application/application_connector.mojom.h"
9 #include "mojo/services/gpu/interfaces/gpu.mojom.h" 9 #include "mojo/services/gpu/interfaces/gpu.mojom.h"
10 10
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 GLContext::~GLContext() { 24 GLContext::~GLContext() {
25 MGLDestroyContext(mgl_context_); 25 MGLDestroyContext(mgl_context_);
26 } 26 }
27 27
28 scoped_refptr<GLContext> GLContext::CreateOffscreen( 28 scoped_refptr<GLContext> GLContext::CreateOffscreen(
29 ApplicationConnector* connector) { 29 ApplicationConnector* connector) {
30 ServiceProviderPtr native_viewport; 30 ServiceProviderPtr native_viewport;
31 connector->ConnectToApplication("mojo:native_viewport_service", 31 connector->ConnectToApplication("mojo:native_viewport_service",
32 GetProxy(&native_viewport), nullptr); 32 GetProxy(&native_viewport));
33 GpuPtr gpu_service; 33 GpuPtr gpu_service;
34 ConnectToService(native_viewport.get(), GetProxy(&gpu_service)); 34 ConnectToService(native_viewport.get(), GetProxy(&gpu_service));
35 InterfaceHandle<CommandBuffer> command_buffer; 35 InterfaceHandle<CommandBuffer> command_buffer;
36 gpu_service->CreateOffscreenGLES2Context(GetProxy(&command_buffer)); 36 gpu_service->CreateOffscreenGLES2Context(GetProxy(&command_buffer));
37 return new GLContext(command_buffer.Pass()); 37 return new GLContext(command_buffer.Pass());
38 } 38 }
39 39
40 scoped_refptr<GLContext> GLContext::CreateFromCommandBuffer( 40 scoped_refptr<GLContext> GLContext::CreateFromCommandBuffer(
41 InterfaceHandle<CommandBuffer> command_buffer) { 41 InterfaceHandle<CommandBuffer> command_buffer) {
42 return new GLContext(command_buffer.Pass()); 42 return new GLContext(command_buffer.Pass());
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 GLContext::Scope::~Scope() { 78 GLContext::Scope::~Scope() {
79 DCHECK(gl_context_->IsCurrent()); 79 DCHECK(gl_context_->IsCurrent());
80 80
81 MGLMakeCurrent(prior_mgl_context_); 81 MGLMakeCurrent(prior_mgl_context_);
82 } 82 }
83 83
84 GLContext::Observer::~Observer() {} 84 GLContext::Observer::~Observer() {}
85 85
86 } // namespace mojo 86 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/go/tests/application_impl_test.go ('k') | mojo/public/cpp/application/application_impl_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698