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

Unified Diff: mojo/gpu/gl_context.cc

Issue 1537783002: Improve GL helpers. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years 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 05bd1e355269ad9a72bb2df570f260770499dc60..9cbc94fc24ea7f915267cb4fd9084160366161b4 100644
--- a/mojo/gpu/gl_context.cc
+++ b/mojo/gpu/gl_context.cc
@@ -4,7 +4,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 {
@@ -24,10 +24,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') | mojo/gpu/gl_context_owner.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698