Chromium Code Reviews| 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 5096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5107 // internal implementation. | 5107 // internal implementation. |
| 5108 if (params) { | 5108 if (params) { |
| 5109 if (context_->HasExtension("GL_OES_read_format")) { | 5109 if (context_->HasExtension("GL_OES_read_format")) { |
| 5110 ScopedGLErrorSuppressor suppressor("GLES2DecoderImpl::GetHelper", | 5110 ScopedGLErrorSuppressor suppressor("GLES2DecoderImpl::GetHelper", |
| 5111 GetErrorState()); | 5111 GetErrorState()); |
| 5112 glGetIntegerv(pname, params); | 5112 glGetIntegerv(pname, params); |
| 5113 if (glGetError() == GL_NO_ERROR) | 5113 if (glGetError() == GL_NO_ERROR) |
| 5114 return true; | 5114 return true; |
| 5115 } | 5115 } |
| 5116 *params = GLES2Util::GetGLReadPixelsImplementationFormat( | 5116 *params = GLES2Util::GetGLReadPixelsImplementationFormat( |
| 5117 GetBoundReadFrameBufferInternalFormat()); | 5117 GetBoundReadFrameBufferInternalFormat(), |
| 5118 GetBoundReadFrameBufferTextureType(), | |
| 5119 feature_info_->feature_flags().ext_read_format_bgra); | |
|
no sievers
2016/03/08 00:26:28
Don't we strictly speaking also have to check whet
no sievers
2016/03/08 00:28:44
And also note that checking the internal format is
piman
2016/03/08 00:48:07
On desktop GL, the format/type is orthogonal to th
| |
| 5118 } | 5120 } |
| 5119 return true; | 5121 return true; |
| 5120 case GL_IMPLEMENTATION_COLOR_READ_TYPE: | 5122 case GL_IMPLEMENTATION_COLOR_READ_TYPE: |
| 5121 *num_written = 1; | 5123 *num_written = 1; |
| 5122 if (params) { | 5124 if (params) { |
| 5123 if (context_->HasExtension("GL_OES_read_format")) { | 5125 if (context_->HasExtension("GL_OES_read_format")) { |
| 5124 ScopedGLErrorSuppressor suppressor("GLES2DecoderImpl::GetHelper", | 5126 ScopedGLErrorSuppressor suppressor("GLES2DecoderImpl::GetHelper", |
| 5125 GetErrorState()); | 5127 GetErrorState()); |
| 5126 glGetIntegerv(pname, params); | 5128 glGetIntegerv(pname, params); |
| 5127 if (glGetError() == GL_NO_ERROR) | 5129 if (glGetError() == GL_NO_ERROR) |
| (...skipping 10822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 15950 } | 15952 } |
| 15951 | 15953 |
| 15952 // Include the auto-generated part of this file. We split this because it means | 15954 // Include the auto-generated part of this file. We split this because it means |
| 15953 // we can easily edit the non-auto generated parts right here in this file | 15955 // we can easily edit the non-auto generated parts right here in this file |
| 15954 // instead of having to edit some template or the code generator. | 15956 // instead of having to edit some template or the code generator. |
| 15955 #include "base/macros.h" | 15957 #include "base/macros.h" |
| 15956 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 15958 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 15957 | 15959 |
| 15958 } // namespace gles2 | 15960 } // namespace gles2 |
| 15959 } // namespace gpu | 15961 } // namespace gpu |
| OLD | NEW |