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

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

Issue 99323005: [Mojo] Fix race condition in sample_app's SwapBuffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
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_SAMPLE_GLES2_DELEGATE_H_ 5 #ifndef MOJO_EXAMPLES_SAMPLE_APP_SAMPLE_GLES2_DELEGATE_H_
6 #define MOJO_EXAMPLES_SAMPLE_APP_SAMPLE_GLES2_DELEGATE_H_ 6 #define MOJO_EXAMPLES_SAMPLE_APP_SAMPLE_GLES2_DELEGATE_H_
7 7
8 #include "base/timer/timer.h" 8 #include "base/timer/timer.h"
9 #include "mojo/examples/sample_app/spinning_cube.h" 9 #include "mojo/examples/sample_app/spinning_cube.h"
10 #include "mojo/public/bindings/gles2_client/gles2_client_impl.h" 10 #include "mojo/public/bindings/gles2_client/gles2_client_impl.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace examples { 13 namespace examples {
14 14
15 class SampleGLES2Delegate : public GLES2Delegate { 15 class SampleGLES2Delegate : public GLES2Delegate {
16 public: 16 public:
17 SampleGLES2Delegate(); 17 SampleGLES2Delegate();
18 virtual ~SampleGLES2Delegate(); 18 virtual ~SampleGLES2Delegate();
19 19
20 private: 20 private:
21 virtual void DidCreateContext( 21 virtual void DidCreateContext(
22 GLES2* gl, uint32_t width, uint32_t height) MOJO_OVERRIDE; 22 GLES2ClientImpl* gl, uint32_t width, uint32_t height) MOJO_OVERRIDE;
23 virtual void ContextLost(GLES2* gl) MOJO_OVERRIDE; 23 virtual void ContextLost(GLES2ClientImpl* gl) MOJO_OVERRIDE;
24 24
25 void Draw(); 25 void Draw();
26 26
27 base::Time last_time_; 27 base::Time last_time_;
28 base::RepeatingTimer<SampleGLES2Delegate> timer_; 28 base::RepeatingTimer<SampleGLES2Delegate> timer_;
29 GLES2* gl_;
30 SpinningCube cube_; 29 SpinningCube cube_;
30 GLES2ClientImpl* gl_;
31 }; 31 };
32 32
33 } // namespace examples 33 } // namespace examples
34 } // namespace mojo 34 } // namespace mojo
35 35
36 #endif // MOJO_EXAMPLES_SAMPLE_APP_SAMPLE_GLES2_DELEGATE_H_ 36 #endif // MOJO_EXAMPLES_SAMPLE_APP_SAMPLE_GLES2_DELEGATE_H_
OLDNEW
« no previous file with comments | « mojo/examples/sample_app/native_viewport_client_impl.cc ('k') | mojo/examples/sample_app/sample_gles2_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698