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

Unified Diff: services/native_viewport/main.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
Index: services/native_viewport/main.cc
diff --git a/services/native_viewport/main.cc b/services/native_viewport/main.cc
index 459b8f5bccf8f7cee376b1220e5e5e9e3d9a2d98..81055170632662a0c4a39383f61409ddf063b852 100644
--- a/services/native_viewport/main.cc
+++ b/services/native_viewport/main.cc
@@ -55,19 +55,21 @@ class NativeViewportAppDelegate : public mojo::ApplicationDelegate,
// mojo::InterfaceFactory<NativeViewport> implementation.
void Create(ApplicationConnection* connection,
mojo::InterfaceRequest<NativeViewport> request) override {
- new NativeViewportImpl(app_, is_headless_, request.Pass());
+ if (!gpu_state_.get())
+ gpu_state_ = new gles2::GpuState;
+ new NativeViewportImpl(app_, is_headless_, gpu_state_, request.Pass());
}
// mojo::InterfaceFactory<Gpu> implementation.
void Create(ApplicationConnection* connection,
mojo::InterfaceRequest<Gpu> request) override {
if (!gpu_state_.get())
- gpu_state_ = new gles2::GpuImpl::State;
+ gpu_state_ = new gles2::GpuState;
new gles2::GpuImpl(request.Pass(), gpu_state_);
}
mojo::ApplicationImpl* app_;
- scoped_refptr<gles2::GpuImpl::State> gpu_state_;
+ scoped_refptr<gles2::GpuState> gpu_state_;
bool is_headless_;
mojo::TracingImpl tracing_;

Powered by Google App Engine
This is Rietveld 408576698