| 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::PopulateSubscribedUniformsCHROMIUM() { |
| 977 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 978 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] " |
| 979 << "glPopulateSubscribedUniformsCHROMIUM()"); |
| 980 helper_->PopulateSubscribedUniformsCHROMIUM(); |
| 981 CheckGLError(); |
| 982 } |
| 983 |
| 976 void GLES2Implementation::GetVertexAttribPointerv( | 984 void GLES2Implementation::GetVertexAttribPointerv( |
| 977 GLuint index, GLenum pname, void** ptr) { | 985 GLuint index, GLenum pname, void** ptr) { |
| 978 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 986 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 979 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetVertexAttribPointer(" | 987 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetVertexAttribPointer(" |
| 980 << index << ", " << GLES2Util::GetStringVertexPointer(pname) << ", " | 988 << index << ", " << GLES2Util::GetStringVertexPointer(pname) << ", " |
| 981 << static_cast<void*>(ptr) << ")"); | 989 << static_cast<void*>(ptr) << ")"); |
| 982 GPU_CLIENT_LOG_CODE_BLOCK(int32 num_results = 1); | 990 GPU_CLIENT_LOG_CODE_BLOCK(int32 num_results = 1); |
| 983 if (!vertex_array_object_manager_->GetAttribPointer(index, pname, ptr)) { | 991 if (!vertex_array_object_manager_->GetAttribPointer(index, pname, ptr)) { |
| 984 TRACE_EVENT0("gpu", "GLES2::GetVertexAttribPointerv"); | 992 TRACE_EVENT0("gpu", "GLES2::GetVertexAttribPointerv"); |
| 985 typedef cmds::GetVertexAttribPointerv::Result Result; | 993 typedef cmds::GetVertexAttribPointerv::Result Result; |
| (...skipping 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4082 return true; | 4090 return true; |
| 4083 } | 4091 } |
| 4084 | 4092 |
| 4085 // Include the auto-generated part of this file. We split this because it means | 4093 // 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 | 4094 // 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. | 4095 // instead of having to edit some template or the code generator. |
| 4088 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 4096 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 4089 | 4097 |
| 4090 } // namespace gles2 | 4098 } // namespace gles2 |
| 4091 } // namespace gpu | 4099 } // namespace gpu |
| OLD | NEW |