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

Unified Diff: shell/android/native_viewport_application_loader.cc

Issue 940293003: Add a Display and ContextProvider concept to mojom, use to recreate (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « shell/android/native_viewport_application_loader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/android/native_viewport_application_loader.cc
diff --git a/shell/android/native_viewport_application_loader.cc b/shell/android/native_viewport_application_loader.cc
index 1adf00a95795b8fb3aa2a47b7d38ddb53f758cbe..8068d927063a096367560295644e00ef458923c5 100644
--- a/shell/android/native_viewport_application_loader.cc
+++ b/shell/android/native_viewport_application_loader.cc
@@ -5,6 +5,7 @@
#include "shell/android/native_viewport_application_loader.h"
#include "mojo/public/cpp/application/application_impl.h"
+#include "services/gles2/gpu_state.h"
#include "services/native_viewport/native_viewport_impl.h"
#include "shell/android/keyboard_impl.h"
@@ -35,7 +36,9 @@ bool NativeViewportApplicationLoader::ConfigureIncomingConnection(
void NativeViewportApplicationLoader::Create(
ApplicationConnection* connection,
InterfaceRequest<NativeViewport> request) {
- new native_viewport::NativeViewportImpl(app_.get(), false, request.Pass());
+ if (!gpu_state_)
+ gpu_state_ = new gles2::GpuState;
+ new native_viewport::NativeViewportImpl(false, gpu_state_, request.Pass());
}
void NativeViewportApplicationLoader::Create(
@@ -47,7 +50,7 @@ void NativeViewportApplicationLoader::Create(
void NativeViewportApplicationLoader::Create(ApplicationConnection* connection,
InterfaceRequest<Gpu> request) {
if (!gpu_state_)
- gpu_state_ = new gles2::GpuImpl::State;
+ gpu_state_ = new gles2::GpuState;
new gles2::GpuImpl(request.Pass(), gpu_state_);
}
« no previous file with comments | « shell/android/native_viewport_application_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698