| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <GLES2/gl2ext.h> | 9 #include <GLES2/gl2ext.h> |
| 10 #include <GLES2/gles2_command_buffer.h> | 10 #include <GLES2/gles2_command_buffer.h> |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 swap_buffers_tokens_.push(helper_->InsertToken()); | 840 swap_buffers_tokens_.push(helper_->InsertToken()); |
| 841 helper_->SwapBuffers(); | 841 helper_->SwapBuffers(); |
| 842 helper_->CommandBufferHelper::Flush(); | 842 helper_->CommandBufferHelper::Flush(); |
| 843 // Wait if we added too many swap buffers. | 843 // Wait if we added too many swap buffers. |
| 844 if (swap_buffers_tokens_.size() > kMaxSwapBuffers) { | 844 if (swap_buffers_tokens_.size() > kMaxSwapBuffers) { |
| 845 helper_->WaitForToken(swap_buffers_tokens_.front()); | 845 helper_->WaitForToken(swap_buffers_tokens_.front()); |
| 846 swap_buffers_tokens_.pop(); | 846 swap_buffers_tokens_.pop(); |
| 847 } | 847 } |
| 848 } | 848 } |
| 849 | 849 |
| 850 void GLES2Implementation::CopyTextureToParentTextureCHROMIUM( | |
| 851 GLuint client_child_id, GLuint client_parent_id) { | |
| 852 GPU_CLIENT_LOG("[" << this << "] glCopyTextureToParentTextureCHROMIUM(" | |
| 853 << client_child_id << ", " | |
| 854 << client_parent_id << ")"); | |
| 855 helper_->CopyTextureToParentTextureCHROMIUM(client_child_id, | |
| 856 client_parent_id); | |
| 857 } | |
| 858 | |
| 859 void GLES2Implementation::GenSharedIdsCHROMIUM( | 850 void GLES2Implementation::GenSharedIdsCHROMIUM( |
| 860 GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) { | 851 GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) { |
| 861 GPU_CLIENT_LOG("[" << this << "] glGenSharedIdsCHROMIUMTextures(" | 852 GPU_CLIENT_LOG("[" << this << "] glGenSharedIdsCHROMIUMTextures(" |
| 862 << namespace_id << ", " << id_offset << ", " << n << ", " << | 853 << namespace_id << ", " << id_offset << ", " << n << ", " << |
| 863 static_cast<void*>(ids) << ")"); | 854 static_cast<void*>(ids) << ")"); |
| 864 GPU_CLIENT_LOG_CODE_BLOCK({ | 855 GPU_CLIENT_LOG_CODE_BLOCK({ |
| 865 for (GLsizei i = 0; i < n; ++i) { | 856 for (GLsizei i = 0; i < n; ++i) { |
| 866 GPU_CLIENT_LOG(" " << i << ": " << ids[i]); | 857 GPU_CLIENT_LOG(" " << i << ": " << ids[i]); |
| 867 } | 858 } |
| 868 }); | 859 }); |
| (...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2430 if (static_cast<size_t>(bufsize) < result.size()) { | 2421 if (static_cast<size_t>(bufsize) < result.size()) { |
| 2431 SetGLError(GL_INVALID_OPERATION, | 2422 SetGLError(GL_INVALID_OPERATION, |
| 2432 "glProgramInfoCHROMIUM: bufsize is too small for result."); | 2423 "glProgramInfoCHROMIUM: bufsize is too small for result."); |
| 2433 return; | 2424 return; |
| 2434 } | 2425 } |
| 2435 memcpy(info, &result[0], result.size()); | 2426 memcpy(info, &result[0], result.size()); |
| 2436 } | 2427 } |
| 2437 | 2428 |
| 2438 } // namespace gles2 | 2429 } // namespace gles2 |
| 2439 } // namespace gpu | 2430 } // namespace gpu |
| OLD | NEW |