| 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 <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 6185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6196 case GL_IMPLEMENTATION_COLOR_READ_FORMAT: | 6196 case GL_IMPLEMENTATION_COLOR_READ_FORMAT: |
| 6197 case GL_IMPLEMENTATION_COLOR_READ_TYPE: | 6197 case GL_IMPLEMENTATION_COLOR_READ_TYPE: |
| 6198 // They are not supported on Desktop GL until 4.1, but could be exposed | 6198 // They are not supported on Desktop GL until 4.1, but could be exposed |
| 6199 // through GL_OES_read_format extension. However, a conflicting extension | 6199 // through GL_OES_read_format extension. However, a conflicting extension |
| 6200 // GL_ARB_ES2_compatibility specifies an error case when requested on | 6200 // GL_ARB_ES2_compatibility specifies an error case when requested on |
| 6201 // integer/floating point buffers. | 6201 // integer/floating point buffers. |
| 6202 // To simpify the handling, we just query and check for GL errors. If an | 6202 // To simpify the handling, we just query and check for GL errors. If an |
| 6203 // GL error occur, we fall back to our internal implementation. | 6203 // GL error occur, we fall back to our internal implementation. |
| 6204 *num_written = 1; | 6204 *num_written = 1; |
| 6205 if (!CheckBoundReadFramebufferValid("glGetIntegerv", | 6205 if (!CheckBoundReadFramebufferValid("glGetIntegerv", |
| 6206 GL_INVALID_OPERATION)) { | 6206 GL_INVALID_FRAMEBUFFER_OPERATION)) { |
| 6207 if (params) { | 6207 if (params) { |
| 6208 *params = 0; | 6208 *params = 0; |
| 6209 } | 6209 } |
| 6210 return true; | 6210 return true; |
| 6211 } | 6211 } |
| 6212 if (params) { | 6212 if (params) { |
| 6213 ScopedGLErrorSuppressor suppressor("GLES2DecoderImpl::GetHelper", | 6213 ScopedGLErrorSuppressor suppressor("GLES2DecoderImpl::GetHelper", |
| 6214 GetErrorState()); | 6214 GetErrorState()); |
| 6215 glGetIntegerv(pname, params); | 6215 glGetIntegerv(pname, params); |
| 6216 bool is_valid = glGetError() == GL_NO_ERROR; | 6216 bool is_valid = glGetError() == GL_NO_ERROR; |
| (...skipping 12717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18934 } | 18934 } |
| 18935 | 18935 |
| 18936 // Include the auto-generated part of this file. We split this because it means | 18936 // Include the auto-generated part of this file. We split this because it means |
| 18937 // we can easily edit the non-auto generated parts right here in this file | 18937 // we can easily edit the non-auto generated parts right here in this file |
| 18938 // instead of having to edit some template or the code generator. | 18938 // instead of having to edit some template or the code generator. |
| 18939 #include "base/macros.h" | 18939 #include "base/macros.h" |
| 18940 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 18940 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 18941 | 18941 |
| 18942 } // namespace gles2 | 18942 } // namespace gles2 |
| 18943 } // namespace gpu | 18943 } // namespace gpu |
| OLD | NEW |