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 4824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4835 return; | 4835 return; |
4836 } | 4836 } |
4837 if (static_cast<size_t>(bufsize) < result.size()) { | 4837 if (static_cast<size_t>(bufsize) < result.size()) { |
4838 SetGLError(GL_INVALID_OPERATION, "glGetTransformFeedbackVaryingsCHROMIUM", | 4838 SetGLError(GL_INVALID_OPERATION, "glGetTransformFeedbackVaryingsCHROMIUM", |
4839 "bufsize is too small for result."); | 4839 "bufsize is too small for result."); |
4840 return; | 4840 return; |
4841 } | 4841 } |
4842 memcpy(info, &result[0], result.size()); | 4842 memcpy(info, &result[0], result.size()); |
4843 } | 4843 } |
4844 | 4844 |
4845 GLuint GLES2Implementation::CreateStreamTextureCHROMIUM(GLuint texture) { | |
4846 GPU_CLIENT_SINGLE_THREAD_CHECK(); | |
4847 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] CreateStreamTextureCHROMIUM(" | |
4848 << texture << ")"); | |
4849 TRACE_EVENT0("gpu", "GLES2::CreateStreamTextureCHROMIUM"); | |
4850 helper_->CommandBufferHelper::Flush(); | |
4851 return gpu_control_->CreateStreamTexture(texture); | |
4852 } | |
4853 | |
4854 void GLES2Implementation::PostSubBufferCHROMIUM( | 4845 void GLES2Implementation::PostSubBufferCHROMIUM( |
4855 GLint x, GLint y, GLint width, GLint height) { | 4846 GLint x, GLint y, GLint width, GLint height) { |
4856 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 4847 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
4857 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] PostSubBufferCHROMIUM(" | 4848 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] PostSubBufferCHROMIUM(" |
4858 << x << ", " << y << ", " << width << ", " << height << ")"); | 4849 << x << ", " << y << ", " << width << ", " << height << ")"); |
4859 TRACE_EVENT2("gpu", "GLES2::PostSubBufferCHROMIUM", | 4850 TRACE_EVENT2("gpu", "GLES2::PostSubBufferCHROMIUM", |
4860 "width", width, "height", height); | 4851 "width", width, "height", height); |
4861 | 4852 |
4862 // Same flow control as GLES2Implementation::SwapBuffers (see comments there). | 4853 // Same flow control as GLES2Implementation::SwapBuffers (see comments there). |
4863 swap_buffers_tokens_.push(helper_->InsertToken()); | 4854 swap_buffers_tokens_.push(helper_->InsertToken()); |
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5970 CheckGLError(); | 5961 CheckGLError(); |
5971 } | 5962 } |
5972 | 5963 |
5973 // Include the auto-generated part of this file. We split this because it means | 5964 // Include the auto-generated part of this file. We split this because it means |
5974 // we can easily edit the non-auto generated parts right here in this file | 5965 // we can easily edit the non-auto generated parts right here in this file |
5975 // instead of having to edit some template or the code generator. | 5966 // instead of having to edit some template or the code generator. |
5976 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 5967 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
5977 | 5968 |
5978 } // namespace gles2 | 5969 } // namespace gles2 |
5979 } // namespace gpu | 5970 } // namespace gpu |
OLD | NEW |