Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1414)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1759433002: Update GL_IMPLEMENTATION_COLOR_READ_FORMAT for BGRA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 context_->HasExtension("GL_EXT_read_format_bgra"));
piman 2016/03/07 21:04:14 Actually, here you're only asking the underlying G
ericrk 2016/03/08 00:07:18 ah, yeah, missed that - thanks! Added this to a fe
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
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
OLDNEW
« gpu/command_buffer/common/gles2_cmd_utils.cc ('K') | « gpu/command_buffer/common/gles2_cmd_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698