| 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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 4503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4514 } else { | 4514 } else { |
| 4515 LOCAL_SET_GL_ERROR( | 4515 LOCAL_SET_GL_ERROR( |
| 4516 GL_INVALID_VALUE, | 4516 GL_INVALID_VALUE, |
| 4517 "glDisableVertexAttribArray", "index out of range"); | 4517 "glDisableVertexAttribArray", "index out of range"); |
| 4518 } | 4518 } |
| 4519 } | 4519 } |
| 4520 | 4520 |
| 4521 void GLES2DecoderImpl::DoDiscardFramebufferEXT(GLenum target, | 4521 void GLES2DecoderImpl::DoDiscardFramebufferEXT(GLenum target, |
| 4522 GLsizei numAttachments, | 4522 GLsizei numAttachments, |
| 4523 const GLenum* attachments) { | 4523 const GLenum* attachments) { |
| 4524 if (workarounds().disable_fbo_invalidations) | 4524 if (workarounds().disable_discard_framebuffer) |
| 4525 return; | 4525 return; |
| 4526 | 4526 |
| 4527 Framebuffer* framebuffer = | 4527 Framebuffer* framebuffer = |
| 4528 GetFramebufferInfoForTarget(GL_FRAMEBUFFER); | 4528 GetFramebufferInfoForTarget(GL_FRAMEBUFFER); |
| 4529 | 4529 |
| 4530 // Validates the attachments. If one of them fails | 4530 // Validates the attachments. If one of them fails |
| 4531 // the whole command fails. | 4531 // the whole command fails. |
| 4532 for (GLsizei i = 0; i < numAttachments; ++i) { | 4532 for (GLsizei i = 0; i < numAttachments; ++i) { |
| 4533 if ((framebuffer && | 4533 if ((framebuffer && |
| 4534 !validators_->attachment.IsValid(attachments[i])) || | 4534 !validators_->attachment.IsValid(attachments[i])) || |
| (...skipping 8025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12560 } | 12560 } |
| 12561 } | 12561 } |
| 12562 | 12562 |
| 12563 // Include the auto-generated part of this file. We split this because it means | 12563 // Include the auto-generated part of this file. We split this because it means |
| 12564 // we can easily edit the non-auto generated parts right here in this file | 12564 // we can easily edit the non-auto generated parts right here in this file |
| 12565 // instead of having to edit some template or the code generator. | 12565 // instead of having to edit some template or the code generator. |
| 12566 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 12566 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 12567 | 12567 |
| 12568 } // namespace gles2 | 12568 } // namespace gles2 |
| 12569 } // namespace gpu | 12569 } // namespace gpu |
| OLD | NEW |