OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "mojo/gpu/mojo_context_support.h" | 5 #include "mojo/gpu/mojo_context_support.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "mojo/public/c/gpu/MGL/mgl_signal_sync_point.h" |
9 | 10 |
10 namespace mojo { | 11 namespace mojo { |
11 namespace { | 12 namespace { |
12 | 13 |
13 void RunAndDeleteCallback(void* context) { | 14 void RunAndDeleteCallback(void* context) { |
14 base::Closure* callback = reinterpret_cast<base::Closure*>(context); | 15 base::Closure* callback = reinterpret_cast<base::Closure*>(context); |
15 callback->Run(); | 16 callback->Run(); |
16 delete callback; | 17 delete callback; |
17 } | 18 } |
18 } | 19 } |
19 | 20 |
20 MojoContextSupport::MojoContextSupport(MojoGLES2Context context) | 21 MojoContextSupport::MojoContextSupport(MojoGLES2Context context) |
21 : context_(context) { | 22 : context_(context) { |
22 } | 23 } |
23 | 24 |
24 MojoContextSupport::~MojoContextSupport() { | 25 MojoContextSupport::~MojoContextSupport() { |
25 } | 26 } |
26 | 27 |
27 void MojoContextSupport::SignalSyncPoint(uint32 sync_point, | 28 void MojoContextSupport::SignalSyncPoint(uint32 sync_point, |
28 const base::Closure& callback) { | 29 const base::Closure& callback) { |
29 MojoGLES2SignalSyncPoint(context_, sync_point, &RunAndDeleteCallback, | 30 MGLSignalSyncPoint(sync_point, &RunAndDeleteCallback, |
30 new base::Closure(callback)); | 31 new base::Closure(callback)); |
31 } | 32 } |
32 | 33 |
33 void MojoContextSupport::SignalQuery(uint32 query, | 34 void MojoContextSupport::SignalQuery(uint32 query, |
34 const base::Closure& callback) { | 35 const base::Closure& callback) { |
35 NOTIMPLEMENTED(); | 36 NOTIMPLEMENTED(); |
36 } | 37 } |
37 | 38 |
38 void MojoContextSupport::SetSurfaceVisible(bool visible) { | 39 void MojoContextSupport::SetSurfaceVisible(bool visible) { |
39 NOTIMPLEMENTED(); | 40 NOTIMPLEMENTED(); |
40 } | 41 } |
(...skipping 19 matching lines...) Expand all Loading... |
60 uint32 MojoContextSupport::InsertFutureSyncPointCHROMIUM() { | 61 uint32 MojoContextSupport::InsertFutureSyncPointCHROMIUM() { |
61 NOTIMPLEMENTED(); | 62 NOTIMPLEMENTED(); |
62 return 0u; | 63 return 0u; |
63 } | 64 } |
64 | 65 |
65 void MojoContextSupport::RetireSyncPointCHROMIUM(uint32 sync_point) { | 66 void MojoContextSupport::RetireSyncPointCHROMIUM(uint32 sync_point) { |
66 NOTIMPLEMENTED(); | 67 NOTIMPLEMENTED(); |
67 } | 68 } |
68 | 69 |
69 } // namespace mojo | 70 } // namespace mojo |
OLD | NEW |