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_GLES2_CLIENT_IMPL_H_ |
| 6 #define MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_ |
| 7 |
| 8 #include "base/timer/timer.h" |
| 9 #include "mojo/examples/sample_app/spinning_cube.h" |
| 10 #include "mojo/public/bindings/lib/remote_ptr.h" |
| 11 #include "mojom/gles2.h" |
| 12 |
| 13 namespace mojo { |
| 14 namespace examples { |
| 15 |
| 16 class GLES2ClientImpl : public GLES2ClientStub { |
| 17 public: |
| 18 explicit GLES2ClientImpl(ScopedMessagePipeHandle pipe); |
| 19 virtual ~GLES2ClientImpl(); |
| 20 |
| 21 private: |
| 22 virtual void DidCreateContext(uint64_t encoded, |
| 23 uint32_t width, |
| 24 uint32_t height) MOJO_OVERRIDE; |
| 25 virtual void ContextLost() MOJO_OVERRIDE; |
| 26 |
| 27 void Draw(); |
| 28 |
| 29 base::Time last_time_; |
| 30 base::RepeatingTimer<GLES2ClientImpl> timer_; |
| 31 SpinningCube cube_; |
| 32 |
| 33 RemotePtr<GLES2> service_; |
| 34 |
| 35 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2ClientImpl); |
| 36 }; |
| 37 |
| 38 } // namespace examples |
| 39 } // namespace mojo |
| 40 |
| 41 #endif // MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_ |
OLD | NEW |