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/gl2ext.h> | 9 #include <GLES2/gl2ext.h> |
10 #include <GLES2/gl2extchromium.h> | 10 #include <GLES2/gl2extchromium.h> |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 966 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
967 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindUniformLocationCHROMIUM(" | 967 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindUniformLocationCHROMIUM(" |
968 << program << ", " << location << ", " << name << ")"); | 968 << program << ", " << location << ", " << name << ")"); |
969 SetBucketAsString(kResultBucketId, name); | 969 SetBucketAsString(kResultBucketId, name); |
970 helper_->BindUniformLocationCHROMIUMBucket( | 970 helper_->BindUniformLocationCHROMIUMBucket( |
971 program, location, kResultBucketId); | 971 program, location, kResultBucketId); |
972 helper_->SetBucketSize(kResultBucketId, 0); | 972 helper_->SetBucketSize(kResultBucketId, 0); |
973 CheckGLError(); | 973 CheckGLError(); |
974 } | 974 } |
975 | 975 |
| 976 void GLES2Implementation::SubscribeUniformCHROMIUM(GLenum target, |
| 977 const GLchar* name) { |
| 978 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 979 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] SubscribeUniformCHROMIUM(" |
| 980 << target << ", " << name << ")"); |
| 981 SetBucketAsString(kResultBucketId, name); |
| 982 helper_->SubscribeUniformCHROMIUM(target, kResultBucketId); |
| 983 helper_->SetBucketSize(kResultBucketId, 0); |
| 984 CheckGLError(); |
| 985 } |
| 986 |
976 void GLES2Implementation::GetVertexAttribPointerv( | 987 void GLES2Implementation::GetVertexAttribPointerv( |
977 GLuint index, GLenum pname, void** ptr) { | 988 GLuint index, GLenum pname, void** ptr) { |
978 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 989 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
979 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetVertexAttribPointer(" | 990 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetVertexAttribPointer(" |
980 << index << ", " << GLES2Util::GetStringVertexPointer(pname) << ", " | 991 << index << ", " << GLES2Util::GetStringVertexPointer(pname) << ", " |
981 << static_cast<void*>(ptr) << ")"); | 992 << static_cast<void*>(ptr) << ")"); |
982 GPU_CLIENT_LOG_CODE_BLOCK(int32 num_results = 1); | 993 GPU_CLIENT_LOG_CODE_BLOCK(int32 num_results = 1); |
983 if (!vertex_array_object_manager_->GetAttribPointer(index, pname, ptr)) { | 994 if (!vertex_array_object_manager_->GetAttribPointer(index, pname, ptr)) { |
984 TRACE_EVENT0("gpu", "GLES2::GetVertexAttribPointerv"); | 995 TRACE_EVENT0("gpu", "GLES2::GetVertexAttribPointerv"); |
985 typedef cmds::GetVertexAttribPointerv::Result Result; | 996 typedef cmds::GetVertexAttribPointerv::Result Result; |
(...skipping 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4082 return true; | 4093 return true; |
4083 } | 4094 } |
4084 | 4095 |
4085 // Include the auto-generated part of this file. We split this because it means | 4096 // Include the auto-generated part of this file. We split this because it means |
4086 // we can easily edit the non-auto generated parts right here in this file | 4097 // we can easily edit the non-auto generated parts right here in this file |
4087 // instead of having to edit some template or the code generator. | 4098 // instead of having to edit some template or the code generator. |
4088 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 4099 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
4089 | 4100 |
4090 } // namespace gles2 | 4101 } // namespace gles2 |
4091 } // namespace gpu | 4102 } // namespace gpu |
OLD | NEW |