Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h

Issue 660229: "/b/slave/chromium-rel-linux/build/src/gpu/command_buffer/client/gles2_demo_c... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file is auto-generated. DO NOT EDIT! 5 // This file is auto-generated. DO NOT EDIT!
6 6
7 // It is included by gles2_cmd_decoder.cc 7 // It is included by gles2_cmd_decoder.cc
8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
9 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 9 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
10 10
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 return error::kNoError; 1080 return error::kNoError;
1081 } 1081 }
1082 1082
1083 error::Error GLES2DecoderImpl::HandleGetProgramInfoLog( 1083 error::Error GLES2DecoderImpl::HandleGetProgramInfoLog(
1084 uint32 immediate_data_size, const gles2::GetProgramInfoLog& c) { 1084 uint32 immediate_data_size, const gles2::GetProgramInfoLog& c) {
1085 GLuint program; 1085 GLuint program;
1086 if (!id_manager()->GetServiceId(c.program, &program)) { 1086 if (!id_manager()->GetServiceId(c.program, &program)) {
1087 SetGLError(GL_INVALID_VALUE); 1087 SetGLError(GL_INVALID_VALUE);
1088 return error::kNoError; 1088 return error::kNoError;
1089 } 1089 }
1090 uint32 bucket_id = static_cast<uint32>(c.bucket_id); 1090 GLsizei bufsize = static_cast<GLsizei>(c.bufsize);
1091 GLint len = 0; 1091 uint32 size_shm_id = c.length_shm_id;
1092 glGetProgramiv(program, GL_INFO_LOG_LENGTH, &len); 1092 uint32 size_shm_offset = c.length_shm_offset;
1093 Bucket* bucket = CreateBucket(bucket_id); 1093 GLsizei* length = NULL;
1094 bucket->SetSize(len + 1); 1094 if (size_shm_id != 0 || size_shm_offset != 0) {
1095 glGetProgramInfoLog( 1095 length = GetSharedMemoryAs<GLsizei*>(
1096 program, len + 1, &len, bucket->GetDataAs<GLchar*>(0, len + 1)); 1096 size_shm_id, size_shm_offset, sizeof(*length));
1097 if (!length) {
1098 return error::kOutOfBounds;
1099 }
1100 }
1101 char* infolog = GetSharedMemoryAs<char*>(
1102 c.infolog_shm_id, c.infolog_shm_offset, bufsize);
1103 if (bufsize < 0) {
1104 SetGLError(GL_INVALID_VALUE);
1105 return error::kNoError;
1106 }
1107 if (infolog == NULL) {
1108 return error::kOutOfBounds;
1109 }
1110 glGetProgramInfoLog(program, bufsize, length, infolog);
1097 return error::kNoError; 1111 return error::kNoError;
1098 } 1112 }
1099 1113
1100 error::Error GLES2DecoderImpl::HandleGetRenderbufferParameteriv( 1114 error::Error GLES2DecoderImpl::HandleGetRenderbufferParameteriv(
1101 uint32 immediate_data_size, const gles2::GetRenderbufferParameteriv& c) { 1115 uint32 immediate_data_size, const gles2::GetRenderbufferParameteriv& c) {
1102 GLenum target = static_cast<GLenum>(c.target); 1116 GLenum target = static_cast<GLenum>(c.target);
1103 GLenum pname = static_cast<GLenum>(c.pname); 1117 GLenum pname = static_cast<GLenum>(c.pname);
1104 GLint* params; 1118 GLint* params;
1105 GLsizei num_values = util_.GLGetNumValuesReturned(pname); 1119 GLsizei num_values = util_.GLGetNumValuesReturned(pname);
1106 uint32 params_size = num_values * sizeof(*params); 1120 uint32 params_size = num_values * sizeof(*params);
(...skipping 27 matching lines...) Expand all
1134 uint32 params_size = num_values * sizeof(*params); 1148 uint32 params_size = num_values * sizeof(*params);
1135 params = GetSharedMemoryAs<GLint*>( 1149 params = GetSharedMemoryAs<GLint*>(
1136 c.params_shm_id, c.params_shm_offset, params_size); 1150 c.params_shm_id, c.params_shm_offset, params_size);
1137 if (!ValidateGLenumShaderParameter(pname)) { 1151 if (!ValidateGLenumShaderParameter(pname)) {
1138 SetGLError(GL_INVALID_ENUM); 1152 SetGLError(GL_INVALID_ENUM);
1139 return error::kNoError; 1153 return error::kNoError;
1140 } 1154 }
1141 if (params == NULL) { 1155 if (params == NULL) {
1142 return error::kOutOfBounds; 1156 return error::kOutOfBounds;
1143 } 1157 }
1144 DoGetShaderiv(shader, pname, params); 1158 glGetShaderiv(shader, pname, params);
1145 return error::kNoError; 1159 return error::kNoError;
1146 } 1160 }
1147 1161
1148 error::Error GLES2DecoderImpl::HandleGetShaderInfoLog( 1162 error::Error GLES2DecoderImpl::HandleGetShaderInfoLog(
1149 uint32 immediate_data_size, const gles2::GetShaderInfoLog& c) { 1163 uint32 immediate_data_size, const gles2::GetShaderInfoLog& c) {
1150 GLuint shader; 1164 GLuint shader;
1151 if (!id_manager()->GetServiceId(c.shader, &shader)) { 1165 if (!id_manager()->GetServiceId(c.shader, &shader)) {
1152 SetGLError(GL_INVALID_VALUE); 1166 SetGLError(GL_INVALID_VALUE);
1153 return error::kNoError; 1167 return error::kNoError;
1154 } 1168 }
1155 uint32 bucket_id = static_cast<uint32>(c.bucket_id); 1169 GLsizei bufsize = static_cast<GLsizei>(c.bufsize);
1156 GLint len = 0; 1170 uint32 size_shm_id = c.length_shm_id;
1157 glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &len); 1171 uint32 size_shm_offset = c.length_shm_offset;
1158 Bucket* bucket = CreateBucket(bucket_id); 1172 GLsizei* length = NULL;
1159 bucket->SetSize(len + 1); 1173 if (size_shm_id != 0 || size_shm_offset != 0) {
1160 glGetShaderInfoLog( 1174 length = GetSharedMemoryAs<GLsizei*>(
1161 shader, len + 1, &len, bucket->GetDataAs<GLchar*>(0, len + 1)); 1175 size_shm_id, size_shm_offset, sizeof(*length));
1176 if (!length) {
1177 return error::kOutOfBounds;
1178 }
1179 }
1180 char* infolog = GetSharedMemoryAs<char*>(
1181 c.infolog_shm_id, c.infolog_shm_offset, bufsize);
1182 if (bufsize < 0) {
1183 SetGLError(GL_INVALID_VALUE);
1184 return error::kNoError;
1185 }
1186 if (infolog == NULL) {
1187 return error::kOutOfBounds;
1188 }
1189 glGetShaderInfoLog(shader, bufsize, length, infolog);
1162 return error::kNoError; 1190 return error::kNoError;
1163 } 1191 }
1164 1192
1165 error::Error GLES2DecoderImpl::HandleGetShaderSource( 1193 error::Error GLES2DecoderImpl::HandleGetShaderSource(
1166 uint32 immediate_data_size, const gles2::GetShaderSource& c) { 1194 uint32 immediate_data_size, const gles2::GetShaderSource& c) {
1167 GLuint shader; 1195 GLuint shader;
1168 if (!id_manager()->GetServiceId(c.shader, &shader)) { 1196 if (!id_manager()->GetServiceId(c.shader, &shader)) {
1169 SetGLError(GL_INVALID_VALUE); 1197 SetGLError(GL_INVALID_VALUE);
1170 return error::kNoError; 1198 return error::kNoError;
1171 } 1199 }
1172 uint32 bucket_id = static_cast<uint32>(c.bucket_id); 1200 GLsizei bufsize = static_cast<GLsizei>(c.bufsize);
1173 GLint len = 0; 1201 uint32 size_shm_id = c.length_shm_id;
1174 DoGetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &len); 1202 uint32 size_shm_offset = c.length_shm_offset;
1175 Bucket* bucket = CreateBucket(bucket_id); 1203 GLsizei* length = NULL;
1176 bucket->SetSize(len + 1); 1204 if (size_shm_id != 0 || size_shm_offset != 0) {
1177 DoGetShaderSource( 1205 length = GetSharedMemoryAs<GLsizei*>(
1178 shader, len + 1, &len, bucket->GetDataAs<GLchar*>(0, len + 1)); 1206 size_shm_id, size_shm_offset, sizeof(*length));
1207 if (!length) {
1208 return error::kOutOfBounds;
1209 }
1210 }
1211 char* source = GetSharedMemoryAs<char*>(
1212 c.source_shm_id, c.source_shm_offset, bufsize);
1213 if (bufsize < 0) {
1214 SetGLError(GL_INVALID_VALUE);
1215 return error::kNoError;
1216 }
1217 if (source == NULL) {
1218 return error::kOutOfBounds;
1219 }
1220 DoGetShaderSource(shader, bufsize, length, source);
1221 return error::kNoError;
1222 }
1223
1224 error::Error GLES2DecoderImpl::HandleGetString(
1225 uint32 immediate_data_size, const gles2::GetString& c) {
1226 GLenum name = static_cast<GLenum>(c.name);
1227 if (!ValidateGLenumStringType(name)) {
1228 SetGLError(GL_INVALID_ENUM);
1229 return error::kNoError;
1230 }
1231 glGetString(name);
1179 return error::kNoError; 1232 return error::kNoError;
1180 } 1233 }
1181 1234
1182 error::Error GLES2DecoderImpl::HandleGetTexParameterfv( 1235 error::Error GLES2DecoderImpl::HandleGetTexParameterfv(
1183 uint32 immediate_data_size, const gles2::GetTexParameterfv& c) { 1236 uint32 immediate_data_size, const gles2::GetTexParameterfv& c) {
1184 GLenum target = static_cast<GLenum>(c.target); 1237 GLenum target = static_cast<GLenum>(c.target);
1185 GLenum pname = static_cast<GLenum>(c.pname); 1238 GLenum pname = static_cast<GLenum>(c.pname);
1186 GLfloat* params; 1239 GLfloat* params;
1187 GLsizei num_values = util_.GLGetNumValuesReturned(pname); 1240 GLsizei num_values = util_.GLGetNumValuesReturned(pname);
1188 uint32 params_size = num_values * sizeof(*params); 1241 uint32 params_size = num_values * sizeof(*params);
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 } 2527 }
2475 2528
2476 error::Error GLES2DecoderImpl::HandleSwapBuffers( 2529 error::Error GLES2DecoderImpl::HandleSwapBuffers(
2477 uint32 immediate_data_size, const gles2::SwapBuffers& c) { 2530 uint32 immediate_data_size, const gles2::SwapBuffers& c) {
2478 DoSwapBuffers(); 2531 DoSwapBuffers();
2479 return error::kNoError; 2532 return error::kNoError;
2480 } 2533 }
2481 2534
2482 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 2535 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
2483 2536
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698