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 "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 3120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3131 if (bound_element_array_buffer_id_ == 0) { | 3131 if (bound_element_array_buffer_id_ == 0) { |
3132 // Restore the element array binding. | 3132 // Restore the element array binding. |
3133 helper_->BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); | 3133 helper_->BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); |
3134 } | 3134 } |
3135 #else | 3135 #else |
3136 helper_->DrawElementsInstancedANGLE( | 3136 helper_->DrawElementsInstancedANGLE( |
3137 mode, count, type, ToGLuint(indices), primcount); | 3137 mode, count, type, ToGLuint(indices), primcount); |
3138 #endif | 3138 #endif |
3139 } | 3139 } |
3140 | 3140 |
| 3141 void GLES2Implementation::GenMailboxCHROMIUM( |
| 3142 GLbyte* mailbox) { |
| 3143 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 3144 GPU_CLIENT_LOG("[" << this << "] glGenMailboxCHROMIUM(" |
| 3145 << static_cast<const void*>(mailbox) << ")"); |
| 3146 TRACE_EVENT0("gpu", "GLES2::GenMailboxCHROMIUM"); |
| 3147 |
| 3148 helper_->GenMailboxCHROMIUM(kResultBucketId); |
| 3149 |
| 3150 std::vector<GLbyte> result; |
| 3151 GetBucketContents(kResultBucketId, &result); |
| 3152 |
| 3153 std::copy(result.begin(), result.end(), mailbox); |
| 3154 } |
| 3155 |
3141 } // namespace gles2 | 3156 } // namespace gles2 |
3142 } // namespace gpu | 3157 } // namespace gpu |
OLD | NEW |