| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" | 5 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #ifndef GL_GLEXT_PROTOTYPES | 8 #ifndef GL_GLEXT_PROTOTYPES |
| 9 #define GL_GLEXT_PROTOTYPES 1 | 9 #define GL_GLEXT_PROTOTYPES 1 |
| 10 #endif | 10 #endif |
| (...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 shallowFlushCHROMIUM(); | 1156 shallowFlushCHROMIUM(); |
| 1157 return 0; | 1157 return 0; |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 void WebGraphicsContext3DInProcessCommandBufferImpl::signalSyncPoint( | 1160 void WebGraphicsContext3DInProcessCommandBufferImpl::signalSyncPoint( |
| 1161 unsigned sync_point, | 1161 unsigned sync_point, |
| 1162 WebGraphicsSyncPointCallback* callback) { | 1162 WebGraphicsSyncPointCallback* callback) { |
| 1163 // Take ownership of the callback. | 1163 // Take ownership of the callback. |
| 1164 context_->SignalSyncPoint( | 1164 context_->SignalSyncPoint( |
| 1165 sync_point, base::Bind(&OnSignalSyncPoint, base::Owned(callback))); | 1165 sync_point, base::Bind(&OnSignalSyncPoint, base::Owned(callback))); |
| 1166 // Make sure we have something to flush, or shallowFlushCHROMIUM() | |
| 1167 // doesn't do anything. | |
| 1168 gl_->helper()->Noop(1); | |
| 1169 // This fill force PumpCommands() to run which is what triggers the signal. | |
| 1170 shallowFlushCHROMIUM(); | |
| 1171 } | 1166 } |
| 1172 | 1167 |
| 1173 void WebGraphicsContext3DInProcessCommandBufferImpl::signalQuery( | 1168 void WebGraphicsContext3DInProcessCommandBufferImpl::signalQuery( |
| 1174 unsigned query, | 1169 unsigned query, |
| 1175 WebGraphicsSyncPointCallback* callback) { | 1170 WebGraphicsSyncPointCallback* callback) { |
| 1176 // Take ownership of the callback. | 1171 // Take ownership of the callback. |
| 1177 context_->SignalQuery(query, | 1172 context_->SignalQuery(query, |
| 1178 base::Bind(&OnSignalSyncPoint, base::Owned(callback))); | 1173 base::Bind(&OnSignalSyncPoint, base::Owned(callback))); |
| 1179 } | 1174 } |
| 1180 | 1175 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1191 | 1186 |
| 1192 DELEGATE_TO_GL_9(asyncTexSubImage2DCHROMIUM, AsyncTexSubImage2DCHROMIUM, | 1187 DELEGATE_TO_GL_9(asyncTexSubImage2DCHROMIUM, AsyncTexSubImage2DCHROMIUM, |
| 1193 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei, | 1188 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei, |
| 1194 WGC3Denum, WGC3Denum, const void*) | 1189 WGC3Denum, WGC3Denum, const void*) |
| 1195 | 1190 |
| 1196 DELEGATE_TO_GL_1(waitAsyncTexImage2DCHROMIUM, WaitAsyncTexImage2DCHROMIUM, | 1191 DELEGATE_TO_GL_1(waitAsyncTexImage2DCHROMIUM, WaitAsyncTexImage2DCHROMIUM, |
| 1197 WGC3Denum) | 1192 WGC3Denum) |
| 1198 | 1193 |
| 1199 } // namespace gpu | 1194 } // namespace gpu |
| 1200 } // namespace webkit | 1195 } // namespace webkit |
| OLD | NEW |