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

Side by Side Diff: mojo/examples/sample_app/gles2_client_impl.h

Issue 409263002: Mojo: Get rid of ui::gfx from sample_app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « mojo/examples/sample_app/DEPS ('k') | mojo/examples/sample_app/gles2_client_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_ 5 #ifndef MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_
6 #define MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_ 6 #define MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_
7 7
8 #include "mojo/examples/sample_app/spinning_cube.h" 8 #include "mojo/examples/sample_app/spinning_cube.h"
9 #include "mojo/public/c/gles2/gles2.h" 9 #include "mojo/public/c/gles2/gles2.h"
10 #include "mojo/services/public/interfaces/geometry/geometry.mojom.h"
10 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom. h" 11 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom. h"
11 #include "ui/gfx/point_f.h"
12 #include "ui/gfx/size.h"
13 12
14 namespace examples { 13 namespace examples {
15 14
16 class GLES2ClientImpl { 15 class GLES2ClientImpl {
17 public: 16 public:
18 explicit GLES2ClientImpl(mojo::CommandBufferPtr command_buffer); 17 explicit GLES2ClientImpl(mojo::CommandBufferPtr command_buffer);
19 virtual ~GLES2ClientImpl(); 18 virtual ~GLES2ClientImpl();
20 19
21 void SetSize(const mojo::Size& size); 20 void SetSize(const mojo::Size& size);
22 void HandleInputEvent(const mojo::Event& event); 21 void HandleInputEvent(const mojo::Event& event);
23 22
24 private: 23 private:
25 void ContextLost(); 24 void ContextLost();
26 static void ContextLostThunk(void* closure); 25 static void ContextLostThunk(void* closure);
27 void DrawAnimationFrame(); 26 void DrawAnimationFrame();
28 static void DrawAnimationFrameThunk(void* closure); 27 static void DrawAnimationFrameThunk(void* closure);
29 28
30 void RequestAnimationFrames(); 29 void RequestAnimationFrames();
31 void CancelAnimationFrames(); 30 void CancelAnimationFrames();
32 31
33 MojoTimeTicks last_time_; 32 MojoTimeTicks last_time_;
34 gfx::Size size_; 33 mojo::Size size_;
35 SpinningCube cube_; 34 SpinningCube cube_;
36 gfx::PointF capture_point_; 35 mojo::Point capture_point_;
37 gfx::PointF last_drag_point_; 36 mojo::Point last_drag_point_;
38 MojoTimeTicks drag_start_time_; 37 MojoTimeTicks drag_start_time_;
39 bool getting_animation_frames_; 38 bool getting_animation_frames_;
40 39
41 MojoGLES2Context context_; 40 MojoGLES2Context context_;
42 41
43 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2ClientImpl); 42 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2ClientImpl);
44 }; 43 };
45 44
46 } // namespace examples 45 } // namespace examples
47 46
48 #endif // MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_ 47 #endif // MOJO_EXAMPLES_SAMPLE_APP_GLES2_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/examples/sample_app/DEPS ('k') | mojo/examples/sample_app/gles2_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698