Chromium Code Reviews| 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 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 398 intermediate_sync_token, | 398 intermediate_sync_token, |
| 399 base::Bind(&GLES2Implementation::RunIfContextNotLost, | 399 base::Bind(&GLES2Implementation::RunIfContextNotLost, |
| 400 weak_ptr_factory_.GetWeakPtr(), | 400 weak_ptr_factory_.GetWeakPtr(), |
| 401 callback)); | 401 callback)); |
| 402 } else { | 402 } else { |
| 403 // Invalid sync token, just call the callback immediately. | 403 // Invalid sync token, just call the callback immediately. |
| 404 callback.Run(); | 404 callback.Run(); |
| 405 } | 405 } |
| 406 } | 406 } |
| 407 | 407 |
| 408 bool GLES2Implementation::IsFenceSyncReleased(uint64_t release_count) { | |
|
piman
2016/12/02 19:21:48
nit: please add a comment that this can be called
sunnyps
2016/12/07 03:31:22
Done.
| |
| 409 return gpu_control_->IsFenceSyncReleased(release_count); | |
| 410 } | |
| 411 | |
| 408 void GLES2Implementation::SignalQuery(uint32_t query, | 412 void GLES2Implementation::SignalQuery(uint32_t query, |
| 409 const base::Closure& callback) { | 413 const base::Closure& callback) { |
| 410 // Flush previously entered commands to ensure ordering with any | 414 // Flush previously entered commands to ensure ordering with any |
| 411 // glBeginQueryEXT() calls that may have been put into the context. | 415 // glBeginQueryEXT() calls that may have been put into the context. |
| 412 ShallowFlushCHROMIUM(); | 416 ShallowFlushCHROMIUM(); |
| 413 gpu_control_->SignalQuery( | 417 gpu_control_->SignalQuery( |
| 414 query, | 418 query, |
| 415 base::Bind(&GLES2Implementation::RunIfContextNotLost, | 419 base::Bind(&GLES2Implementation::RunIfContextNotLost, |
| 416 weak_ptr_factory_.GetWeakPtr(), | 420 weak_ptr_factory_.GetWeakPtr(), |
| 417 callback)); | 421 callback)); |
| (...skipping 6612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7030 cached_extensions_.clear(); | 7034 cached_extensions_.clear(); |
| 7031 } | 7035 } |
| 7032 | 7036 |
| 7033 // Include the auto-generated part of this file. We split this because it means | 7037 // Include the auto-generated part of this file. We split this because it means |
| 7034 // we can easily edit the non-auto generated parts right here in this file | 7038 // we can easily edit the non-auto generated parts right here in this file |
| 7035 // instead of having to edit some template or the code generator. | 7039 // instead of having to edit some template or the code generator. |
| 7036 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 7040 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 7037 | 7041 |
| 7038 } // namespace gles2 | 7042 } // namespace gles2 |
| 7039 } // namespace gpu | 7043 } // namespace gpu |
| OLD | NEW |