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 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2952 backbuffer_needs_clear_bits_ = 0; | 2952 backbuffer_needs_clear_bits_ = 0; |
2953 RestoreClearState(); | 2953 RestoreClearState(); |
2954 } | 2954 } |
2955 return true; | 2955 return true; |
2956 } | 2956 } |
2957 | 2957 |
2958 if (framebuffer_manager()->IsComplete(framebuffer)) { | 2958 if (framebuffer_manager()->IsComplete(framebuffer)) { |
2959 return true; | 2959 return true; |
2960 } | 2960 } |
2961 | 2961 |
2962 GLenum completeness = framebuffer->IsPossiblyComplete(); | 2962 GLenum completeness = framebuffer->IsPossiblyComplete(feature_info_.get()); |
2963 if (completeness != GL_FRAMEBUFFER_COMPLETE) { | 2963 if (completeness != GL_FRAMEBUFFER_COMPLETE) { |
2964 LOCAL_SET_GL_ERROR( | 2964 LOCAL_SET_GL_ERROR( |
2965 GL_INVALID_FRAMEBUFFER_OPERATION, func_name, "framebuffer incomplete"); | 2965 GL_INVALID_FRAMEBUFFER_OPERATION, func_name, "framebuffer incomplete"); |
2966 return false; | 2966 return false; |
2967 } | 2967 } |
2968 | 2968 |
2969 // Are all the attachments cleared? | 2969 // Are all the attachments cleared? |
2970 if (renderbuffer_manager()->HaveUnclearedRenderbuffers() || | 2970 if (renderbuffer_manager()->HaveUnclearedRenderbuffers() || |
2971 texture_manager()->HaveUnclearedMips()) { | 2971 texture_manager()->HaveUnclearedMips()) { |
2972 if (!framebuffer->IsCleared()) { | 2972 if (!framebuffer->IsCleared()) { |
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4888 glEnable(GL_SCISSOR_TEST); | 4888 glEnable(GL_SCISSOR_TEST); |
4889 } | 4889 } |
4890 } | 4890 } |
4891 | 4891 |
4892 GLenum GLES2DecoderImpl::DoCheckFramebufferStatus(GLenum target) { | 4892 GLenum GLES2DecoderImpl::DoCheckFramebufferStatus(GLenum target) { |
4893 Framebuffer* framebuffer = | 4893 Framebuffer* framebuffer = |
4894 GetFramebufferInfoForTarget(target); | 4894 GetFramebufferInfoForTarget(target); |
4895 if (!framebuffer) { | 4895 if (!framebuffer) { |
4896 return GL_FRAMEBUFFER_COMPLETE; | 4896 return GL_FRAMEBUFFER_COMPLETE; |
4897 } | 4897 } |
4898 GLenum completeness = framebuffer->IsPossiblyComplete(); | 4898 GLenum completeness = framebuffer->IsPossiblyComplete(feature_info_.get()); |
4899 if (completeness != GL_FRAMEBUFFER_COMPLETE) { | 4899 if (completeness != GL_FRAMEBUFFER_COMPLETE) { |
4900 return completeness; | 4900 return completeness; |
4901 } | 4901 } |
4902 return framebuffer->GetStatus(texture_manager(), target); | 4902 return framebuffer->GetStatus(texture_manager(), target); |
4903 } | 4903 } |
4904 | 4904 |
4905 void GLES2DecoderImpl::DoFramebufferTexture2D( | 4905 void GLES2DecoderImpl::DoFramebufferTexture2D( |
4906 GLenum target, GLenum attachment, GLenum textarget, | 4906 GLenum target, GLenum attachment, GLenum textarget, |
4907 GLuint client_texture_id, GLint level) { | 4907 GLuint client_texture_id, GLint level) { |
4908 DoFramebufferTexture2DCommon( | 4908 DoFramebufferTexture2DCommon( |
(...skipping 5607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10516 DoDidUseTexImageIfNeeded(texture, texture->target()); | 10516 DoDidUseTexImageIfNeeded(texture, texture->target()); |
10517 } | 10517 } |
10518 | 10518 |
10519 // Include the auto-generated part of this file. We split this because it means | 10519 // Include the auto-generated part of this file. We split this because it means |
10520 // we can easily edit the non-auto generated parts right here in this file | 10520 // we can easily edit the non-auto generated parts right here in this file |
10521 // instead of having to edit some template or the code generator. | 10521 // instead of having to edit some template or the code generator. |
10522 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10522 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
10523 | 10523 |
10524 } // namespace gles2 | 10524 } // namespace gles2 |
10525 } // namespace gpu | 10525 } // namespace gpu |
OLD | NEW |