| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MOJO_EXAMPLES_SAMPLE_APP_SAMPLE_GLES2_DELEGATE_H_ | |
| 6 #define MOJO_EXAMPLES_SAMPLE_APP_SAMPLE_GLES2_DELEGATE_H_ | |
| 7 | |
| 8 #include "base/timer/timer.h" | |
| 9 #include "mojo/examples/sample_app/spinning_cube.h" | |
| 10 #include "mojo/public/bindings/gles2_client/gles2_client_impl.h" | |
| 11 | |
| 12 namespace mojo { | |
| 13 namespace examples { | |
| 14 | |
| 15 class SampleGLES2Delegate : public GLES2Delegate { | |
| 16 public: | |
| 17 SampleGLES2Delegate(); | |
| 18 virtual ~SampleGLES2Delegate(); | |
| 19 | |
| 20 private: | |
| 21 virtual void DidCreateContext( | |
| 22 GLES2ClientImpl* gl, uint32_t width, uint32_t height) MOJO_OVERRIDE; | |
| 23 virtual void ContextLost(GLES2ClientImpl* gl) MOJO_OVERRIDE; | |
| 24 | |
| 25 void Draw(); | |
| 26 | |
| 27 base::Time last_time_; | |
| 28 base::RepeatingTimer<SampleGLES2Delegate> timer_; | |
| 29 SpinningCube cube_; | |
| 30 GLES2ClientImpl* gl_; | |
| 31 }; | |
| 32 | |
| 33 } // namespace examples | |
| 34 } // namespace mojo | |
| 35 | |
| 36 #endif // MOJO_EXAMPLES_SAMPLE_APP_SAMPLE_GLES2_DELEGATE_H_ | |
| OLD | NEW |