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

Unified Diff: mojo/gpu/gl_context.cc

Issue 1532923003: Improve GL helpers. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-7
Patch Set: rebase Created 4 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
« no previous file with comments | « mojo/gpu/gl_context.h ('k') | mojo/gpu/gl_context_owner.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 f12a32355ed9d38828286d121683e732b4188024..eb6acdc0fcdf8087ac5e1142bd58b00018254765 100644
--- a/mojo/gpu/gl_context.cc
+++ b/mojo/gpu/gl_context.cc
@@ -5,7 +5,7 @@
#include "mojo/gpu/gl_context.h"
#include "mojo/public/cpp/application/connect.h"
-#include "mojo/public/interfaces/application/shell.mojom.h"
+#include "mojo/public/interfaces/application/application_connector.mojom.h"
#include "mojo/services/gpu/interfaces/gpu.mojom.h"
namespace mojo {
@@ -25,10 +25,11 @@ GLContext::~GLContext() {
MGLDestroyContext(context_);
}
-base::WeakPtr<GLContext> GLContext::Create(Shell* shell) {
+base::WeakPtr<GLContext> GLContext::CreateOffscreen(
+ ApplicationConnector* connector) {
ServiceProviderPtr native_viewport;
- shell->ConnectToApplication("mojo:native_viewport_service",
- GetProxy(&native_viewport), nullptr);
+ connector->ConnectToApplication("mojo:native_viewport_service",
+ GetProxy(&native_viewport), nullptr);
GpuPtr gpu_service;
ConnectToService(native_viewport.get(), &gpu_service);
CommandBufferPtr command_buffer;
« no previous file with comments | « mojo/gpu/gl_context.h ('k') | mojo/gpu/gl_context_owner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698