diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-01 04:08:46 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-01 04:08:46 +0000 |
commit | 1a6755c002598689751b72eb834a24cf023fda99 (patch) | |
tree | d3a194cbe64ef415989f3ecc9810b41c54ae1a29 /mojo/public | |
parent | 628b49a329d5edfca678cf6a455708b12e1b583a (diff) | |
download | chromium_src-1a6755c002598689751b72eb834a24cf023fda99.zip chromium_src-1a6755c002598689751b72eb834a24cf023fda99.tar.gz chromium_src-1a6755c002598689751b72eb834a24cf023fda99.tar.bz2 |
[Mojo] sample_app should draw a spinning cube
After this CL, sample_app draws a spinning cube. We're still driving the
animation off a timer rather than off vsync, but we're making progress. :)
Review URL: https://codereview.chromium.org/95653002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/public')
-rw-r--r-- | mojo/public/bindings/gles2_client/gles2_client_impl.cc | 8 | ||||
-rw-r--r-- | mojo/public/bindings/gles2_client/gles2_client_impl.h | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/mojo/public/bindings/gles2_client/gles2_client_impl.cc b/mojo/public/bindings/gles2_client/gles2_client_impl.cc index a6e4323..1985fea 100644 --- a/mojo/public/bindings/gles2_client/gles2_client_impl.cc +++ b/mojo/public/bindings/gles2_client/gles2_client_impl.cc @@ -18,7 +18,8 @@ bool g_gles2_initialized = false; GLES2Delegate::~GLES2Delegate() { } -void GLES2Delegate::DidCreateContext(GLES2* gl) { +void GLES2Delegate::DidCreateContext( + GLES2* gl, uint32_t width, uint32_t height) { } void GLES2Delegate::ContextLost(GLES2* gl) { @@ -47,7 +48,8 @@ void GLES2ClientImpl::Terminate() { g_gles2_initialized = false; } -void GLES2ClientImpl::DidCreateContext(uint64_t encoded) { +void GLES2ClientImpl::DidCreateContext( + uint64_t encoded, uint32_t width, uint32_t height) { // Ack, Hans! It's the giant hack. // TODO(abarth): Replace this hack with something more disciplined. Most // likley, we should receive a MojoHandle that we use to wire up the @@ -58,7 +60,7 @@ void GLES2ClientImpl::DidCreateContext(uint64_t encoded) { static_cast<uintptr_t>(encoded)); gles2::SetGLContext(gl_interface); - delegate_->DidCreateContext(gl()); + delegate_->DidCreateContext(gl(), width, height); } void GLES2ClientImpl::ContextLost() { diff --git a/mojo/public/bindings/gles2_client/gles2_client_impl.h b/mojo/public/bindings/gles2_client/gles2_client_impl.h index 656cc85..63106ac 100644 --- a/mojo/public/bindings/gles2_client/gles2_client_impl.h +++ b/mojo/public/bindings/gles2_client/gles2_client_impl.h @@ -13,7 +13,7 @@ namespace mojo { class GLES2Delegate { public: virtual ~GLES2Delegate(); - virtual void DidCreateContext(GLES2* gl); + virtual void DidCreateContext(GLES2* gl, uint32_t width, uint32_t height); virtual void ContextLost(GLES2* gl); }; @@ -31,7 +31,8 @@ class GLES2ClientImpl : public GLES2ClientStub { } private: - virtual void DidCreateContext(uint64_t encoded) MOJO_OVERRIDE; + virtual void DidCreateContext( + uint64_t encoded, uint32_t width, uint32_t height) MOJO_OVERRIDE; virtual void ContextLost() MOJO_OVERRIDE; GLES2Delegate* delegate_; |