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

Side by Side Diff: mojo/services/gles2/gles2_impl.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
« no previous file with comments | « mojo/services/gles2/gles2.mojom ('k') | mojo/services/gles2/gles2_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_SERVICES_GLES2_GLES2_IMPL_H_ 5 #ifndef MOJO_SERVICES_GLES2_GLES2_IMPL_H_
6 #define MOJO_SERVICES_GLES2_GLES2_IMPL_H_ 6 #define MOJO_SERVICES_GLES2_GLES2_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/public/bindings/lib/remote_ptr.h" 9 #include "mojo/public/bindings/lib/remote_ptr.h"
10 #include "mojo/public/system/core_cpp.h" 10 #include "mojo/public/system/core_cpp.h"
11 #include "mojom/gles2.h" 11 #include "mojom/gles2.h"
12 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
13 #include "ui/gfx/size.h" 13 #include "ui/gfx/size.h"
14 14
15 namespace gpu { 15 namespace gpu {
16 class GLInProcessContext; 16 class GLInProcessContext;
17 } 17 }
18 18
19 namespace mojo { 19 namespace mojo {
20 namespace services { 20 namespace services {
21 21
22 class GLES2Impl : public GLES2Stub { 22 class GLES2Impl : public GLES2Stub {
23 public: 23 public:
24 explicit GLES2Impl(ScopedMessagePipeHandle client); 24 explicit GLES2Impl(ScopedMessagePipeHandle client);
25 virtual ~GLES2Impl(); 25 virtual ~GLES2Impl();
26 26
27 virtual void SwapBuffers() OVERRIDE; 27 virtual void Destroy() OVERRIDE;
28 28
29 void CreateContext(gfx::AcceleratedWidget widget, const gfx::Size& size); 29 void CreateContext(gfx::AcceleratedWidget widget, const gfx::Size& size);
30 30
31 private: 31 private:
32 void OnGLContextLost(); 32 void OnGLContextLost();
33 33
34 scoped_ptr<gpu::GLInProcessContext> gl_context_; 34 scoped_ptr<gpu::GLInProcessContext> gl_context_;
35 RemotePtr<GLES2Client> client_; 35 RemotePtr<GLES2Client> client_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(GLES2Impl); 37 DISALLOW_COPY_AND_ASSIGN(GLES2Impl);
38 }; 38 };
39 39
40 } // namespace services 40 } // namespace services
41 } // namespace mojo 41 } // namespace mojo
42 42
43 #endif // MOJO_SERVICES_GLES2_GLES2_IMPL_H_ 43 #endif // MOJO_SERVICES_GLES2_GLES2_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/gles2/gles2.mojom ('k') | mojo/services/gles2/gles2_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698