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

Unified Diff: mojo/examples/compositor_app/compositor_app.cc

Issue 131153007: Send size to NativeViewportClient::OnCreated instead of GLES2Client::DidCreateContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix various issues Created 6 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/examples/aura_demo/root_window_host_mojo.cc ('k') | mojo/examples/compositor_app/compositor_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/compositor_app/compositor_app.cc
diff --git a/mojo/examples/compositor_app/compositor_app.cc b/mojo/examples/compositor_app/compositor_app.cc
index 1e7cb66052f9747cb4b5edd41e9f0317b4f09fe5..615a47be059dc8bd76ea1001c4d0768fb5a7b007 100644
--- a/mojo/examples/compositor_app/compositor_app.cc
+++ b/mojo/examples/compositor_app/compositor_app.cc
@@ -51,6 +51,7 @@ class SampleApp : public ShellClient {
public:
explicit NativeViewportClientImpl(ScopedMessagePipeHandle viewport_handle)
: viewport_(viewport_handle.Pass(), this) {
+ AllocationScope allocation;
viewport_->Create(gfx::Rect(10, 10, 800, 600));
viewport_->Show();
ScopedMessagePipeHandle gles2_handle;
@@ -65,8 +66,8 @@ class SampleApp : public ShellClient {
host_.reset(new CompositorHost(gles2_client_.get()));
}
- void DidCreateContext(gfx::Size viewport_size) {
- host_->DidCreateContext(viewport_size);
+ void DidCreateContext() {
+ host_->DidCreateContext();
}
virtual ~NativeViewportClientImpl() {}
@@ -79,6 +80,7 @@ class SampleApp : public ShellClient {
}
virtual void OnBoundsChanged(const Rect& bounds) MOJO_OVERRIDE {
+ host_->SetSize(bounds.size());
}
virtual void OnEvent(const Event& event) MOJO_OVERRIDE {
« no previous file with comments | « mojo/examples/aura_demo/root_window_host_mojo.cc ('k') | mojo/examples/compositor_app/compositor_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698