mojo: Fix map of booleans for python bindings.
[chromium-blink-merge.git] / mojo / examples / sample_app / gles2_client_impl.h
blob1a968a00f163b609f58f5f1671db8aaa8793e180
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.
5 #ifndef MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_
6 #define MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_
8 #include "mojo/examples/sample_app/spinning_cube.h"
9 #include "mojo/public/c/gles2/gles2.h"
10 #include "mojo/services/public/interfaces/geometry/geometry.mojom.h"
11 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.h"
13 namespace examples {
15 class GLES2ClientImpl {
16 public:
17 explicit GLES2ClientImpl(mojo::CommandBufferPtr command_buffer);
18 virtual ~GLES2ClientImpl();
20 void SetSize(const mojo::Size& size);
21 void HandleInputEvent(const mojo::Event& event);
22 void Draw();
24 private:
25 void ContextLost();
26 static void ContextLostThunk(void* closure);
27 void WantToDraw();
29 MojoTimeTicks last_time_;
30 mojo::Size size_;
31 SpinningCube cube_;
32 mojo::Point capture_point_;
33 mojo::Point last_drag_point_;
34 MojoTimeTicks drag_start_time_;
35 bool waiting_to_draw_;
37 MojoGLES2Context context_;
39 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2ClientImpl);
42 } // namespace examples
44 #endif // MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_