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