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 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // DO NOT EDIT! | 7 // DO NOT EDIT! |
8 | 8 |
9 // It is included by gles2_cmd_decoder.cc | 9 // It is included by gles2_cmd_decoder.cc |
10 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 10 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 return error::kOutOfBounds; | 245 return error::kOutOfBounds; |
246 } | 246 } |
247 if (!validators_->frame_buffer_target.IsValid(target)) { | 247 if (!validators_->frame_buffer_target.IsValid(target)) { |
248 SetGLErrorInvalidEnum("glCheckFramebufferStatus", target, "target"); | 248 SetGLErrorInvalidEnum("glCheckFramebufferStatus", target, "target"); |
249 return error::kNoError; | 249 return error::kNoError; |
250 } | 250 } |
251 *result_dst = DoCheckFramebufferStatus(target); | 251 *result_dst = DoCheckFramebufferStatus(target); |
252 return error::kNoError; | 252 return error::kNoError; |
253 } | 253 } |
254 | 254 |
| 255 error::Error GLES2DecoderImpl::HandleClear( |
| 256 uint32 immediate_data_size, const gles2::Clear& c) { |
| 257 if (ShouldDeferDraws()) |
| 258 return error::kDeferCommandUntilLater; |
| 259 GLbitfield mask = static_cast<GLbitfield>(c.mask); |
| 260 DoClear(mask); |
| 261 return error::kNoError; |
| 262 } |
| 263 |
255 error::Error GLES2DecoderImpl::HandleClearColor( | 264 error::Error GLES2DecoderImpl::HandleClearColor( |
256 uint32 immediate_data_size, const gles2::ClearColor& c) { | 265 uint32 immediate_data_size, const gles2::ClearColor& c) { |
257 GLclampf red = static_cast<GLclampf>(c.red); | 266 GLclampf red = static_cast<GLclampf>(c.red); |
258 GLclampf green = static_cast<GLclampf>(c.green); | 267 GLclampf green = static_cast<GLclampf>(c.green); |
259 GLclampf blue = static_cast<GLclampf>(c.blue); | 268 GLclampf blue = static_cast<GLclampf>(c.blue); |
260 GLclampf alpha = static_cast<GLclampf>(c.alpha); | 269 GLclampf alpha = static_cast<GLclampf>(c.alpha); |
261 if (state_.color_clear_red != red || | 270 if (state_.color_clear_red != red || |
262 state_.color_clear_green != green || | 271 state_.color_clear_green != green || |
263 state_.color_clear_blue != blue || | 272 state_.color_clear_blue != blue || |
264 state_.color_clear_alpha != alpha) { | 273 state_.color_clear_alpha != alpha) { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 if (data == NULL) { | 404 if (data == NULL) { |
396 return error::kOutOfBounds; | 405 return error::kOutOfBounds; |
397 } | 406 } |
398 DoCompressedTexSubImage2D( | 407 DoCompressedTexSubImage2D( |
399 target, level, xoffset, yoffset, width, height, format, imageSize, data); | 408 target, level, xoffset, yoffset, width, height, format, imageSize, data); |
400 return error::kNoError; | 409 return error::kNoError; |
401 } | 410 } |
402 | 411 |
403 error::Error GLES2DecoderImpl::HandleCopyTexImage2D( | 412 error::Error GLES2DecoderImpl::HandleCopyTexImage2D( |
404 uint32 immediate_data_size, const gles2::CopyTexImage2D& c) { | 413 uint32 immediate_data_size, const gles2::CopyTexImage2D& c) { |
| 414 if (ShouldDeferReads()) |
| 415 return error::kDeferCommandUntilLater; |
405 GLenum target = static_cast<GLenum>(c.target); | 416 GLenum target = static_cast<GLenum>(c.target); |
406 GLint level = static_cast<GLint>(c.level); | 417 GLint level = static_cast<GLint>(c.level); |
407 GLenum internalformat = static_cast<GLenum>(c.internalformat); | 418 GLenum internalformat = static_cast<GLenum>(c.internalformat); |
408 GLint x = static_cast<GLint>(c.x); | 419 GLint x = static_cast<GLint>(c.x); |
409 GLint y = static_cast<GLint>(c.y); | 420 GLint y = static_cast<GLint>(c.y); |
410 GLsizei width = static_cast<GLsizei>(c.width); | 421 GLsizei width = static_cast<GLsizei>(c.width); |
411 GLsizei height = static_cast<GLsizei>(c.height); | 422 GLsizei height = static_cast<GLsizei>(c.height); |
412 GLint border = static_cast<GLint>(c.border); | 423 GLint border = static_cast<GLint>(c.border); |
413 if (!validators_->texture_target.IsValid(target)) { | 424 if (!validators_->texture_target.IsValid(target)) { |
414 SetGLErrorInvalidEnum("glCopyTexImage2D", target, "target"); | 425 SetGLErrorInvalidEnum("glCopyTexImage2D", target, "target"); |
(...skipping 16 matching lines...) Expand all Loading... |
431 SetGLError( | 442 SetGLError( |
432 GL_INVALID_VALUE, "glCopyTexImage2D", "border GL_INVALID_VALUE"); | 443 GL_INVALID_VALUE, "glCopyTexImage2D", "border GL_INVALID_VALUE"); |
433 return error::kNoError; | 444 return error::kNoError; |
434 } | 445 } |
435 DoCopyTexImage2D(target, level, internalformat, x, y, width, height, border); | 446 DoCopyTexImage2D(target, level, internalformat, x, y, width, height, border); |
436 return error::kNoError; | 447 return error::kNoError; |
437 } | 448 } |
438 | 449 |
439 error::Error GLES2DecoderImpl::HandleCopyTexSubImage2D( | 450 error::Error GLES2DecoderImpl::HandleCopyTexSubImage2D( |
440 uint32 immediate_data_size, const gles2::CopyTexSubImage2D& c) { | 451 uint32 immediate_data_size, const gles2::CopyTexSubImage2D& c) { |
| 452 if (ShouldDeferReads()) |
| 453 return error::kDeferCommandUntilLater; |
441 GLenum target = static_cast<GLenum>(c.target); | 454 GLenum target = static_cast<GLenum>(c.target); |
442 GLint level = static_cast<GLint>(c.level); | 455 GLint level = static_cast<GLint>(c.level); |
443 GLint xoffset = static_cast<GLint>(c.xoffset); | 456 GLint xoffset = static_cast<GLint>(c.xoffset); |
444 GLint yoffset = static_cast<GLint>(c.yoffset); | 457 GLint yoffset = static_cast<GLint>(c.yoffset); |
445 GLint x = static_cast<GLint>(c.x); | 458 GLint x = static_cast<GLint>(c.x); |
446 GLint y = static_cast<GLint>(c.y); | 459 GLint y = static_cast<GLint>(c.y); |
447 GLsizei width = static_cast<GLsizei>(c.width); | 460 GLsizei width = static_cast<GLsizei>(c.width); |
448 GLsizei height = static_cast<GLsizei>(c.height); | 461 GLsizei height = static_cast<GLsizei>(c.height); |
449 if (!validators_->texture_target.IsValid(target)) { | 462 if (!validators_->texture_target.IsValid(target)) { |
450 SetGLErrorInvalidEnum("glCopyTexSubImage2D", target, "target"); | 463 SetGLErrorInvalidEnum("glCopyTexSubImage2D", target, "target"); |
(...skipping 2177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2628 if (height < 0) { | 2641 if (height < 0) { |
2629 SetGLError(GL_INVALID_VALUE, "glViewport", "height < 0"); | 2642 SetGLError(GL_INVALID_VALUE, "glViewport", "height < 0"); |
2630 return error::kNoError; | 2643 return error::kNoError; |
2631 } | 2644 } |
2632 DoViewport(x, y, width, height); | 2645 DoViewport(x, y, width, height); |
2633 return error::kNoError; | 2646 return error::kNoError; |
2634 } | 2647 } |
2635 | 2648 |
2636 error::Error GLES2DecoderImpl::HandleBlitFramebufferEXT( | 2649 error::Error GLES2DecoderImpl::HandleBlitFramebufferEXT( |
2637 uint32 immediate_data_size, const gles2::BlitFramebufferEXT& c) { | 2650 uint32 immediate_data_size, const gles2::BlitFramebufferEXT& c) { |
| 2651 if (ShouldDeferDraws() || ShouldDeferReads()) |
| 2652 return error::kDeferCommandUntilLater; |
2638 GLint srcX0 = static_cast<GLint>(c.srcX0); | 2653 GLint srcX0 = static_cast<GLint>(c.srcX0); |
2639 GLint srcY0 = static_cast<GLint>(c.srcY0); | 2654 GLint srcY0 = static_cast<GLint>(c.srcY0); |
2640 GLint srcX1 = static_cast<GLint>(c.srcX1); | 2655 GLint srcX1 = static_cast<GLint>(c.srcX1); |
2641 GLint srcY1 = static_cast<GLint>(c.srcY1); | 2656 GLint srcY1 = static_cast<GLint>(c.srcY1); |
2642 GLint dstX0 = static_cast<GLint>(c.dstX0); | 2657 GLint dstX0 = static_cast<GLint>(c.dstX0); |
2643 GLint dstY0 = static_cast<GLint>(c.dstY0); | 2658 GLint dstY0 = static_cast<GLint>(c.dstY0); |
2644 GLint dstX1 = static_cast<GLint>(c.dstX1); | 2659 GLint dstX1 = static_cast<GLint>(c.dstX1); |
2645 GLint dstY1 = static_cast<GLint>(c.dstY1); | 2660 GLint dstY1 = static_cast<GLint>(c.dstY1); |
2646 GLbitfield mask = static_cast<GLbitfield>(c.mask); | 2661 GLbitfield mask = static_cast<GLbitfield>(c.mask); |
2647 GLenum filter = static_cast<GLenum>(c.filter); | 2662 GLenum filter = static_cast<GLenum>(c.filter); |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3138 clear_state_dirty_ = true; | 3153 clear_state_dirty_ = true; |
3139 } | 3154 } |
3140 return false; | 3155 return false; |
3141 default: | 3156 default: |
3142 NOTREACHED(); | 3157 NOTREACHED(); |
3143 return false; | 3158 return false; |
3144 } | 3159 } |
3145 } | 3160 } |
3146 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 3161 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
3147 | 3162 |
OLD | NEW |