diff options
author | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-22 00:41:20 +0000 |
---|---|---|
committer | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-22 00:41:20 +0000 |
commit | 7601c3f3fd5fe752da49e2f423d30b2ce7ba5055 (patch) | |
tree | 6bbd9ca28d5451c60432256945d9331b1292b6ad /gpu/command_buffer | |
parent | d1e83b331605d593a753aa3c9854bdec1e9515c0 (diff) | |
download | chromium_src-7601c3f3fd5fe752da49e2f423d30b2ce7ba5055.zip chromium_src-7601c3f3fd5fe752da49e2f423d30b2ce7ba5055.tar.gz chromium_src-7601c3f3fd5fe752da49e2f423d30b2ce7ba5055.tar.bz2 |
Fixed requesting of GL_EXT_texture_format_BGRA8888 and
GL_EXT_read_format_bgra on desktop systems where the underlying
extension is GL_EXT_bgra. Fixed glDrawArrays to synthesize
INVALID_VALUE instead of INVALID_ENUM when first < 0. Tested these
changes with --enable-accelerated-2d-canvas.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6015006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r-- | gpu/command_buffer/service/feature_info.cc | 7 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index 5d9403e..b42bd4e 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -177,7 +177,8 @@ void FeatureInfo::AddFeatures(const char* desired_features) { // Check if we should allow GL_EXT_texture_format_BGRA8888 if (ext.Desire("GL_EXT_texture_format_BGRA8888") && (ext.Have("GL_EXT_texture_format_BGRA8888") || - ext.Have("GL_APPLE_texture_format_BGRA8888"))) { + ext.Have("GL_APPLE_texture_format_BGRA8888") || + ext.Have("GL_EXT_bgra"))) { enable_texture_format_bgra8888 = true; } @@ -186,7 +187,9 @@ void FeatureInfo::AddFeatures(const char* desired_features) { enable_read_format_bgra = true; } - if (ext.HaveAndDesire("GL_EXT_read_format_bgra")) { + if (ext.Desire("GL_EXT_read_format_bgra") && + (ext.Have("GL_EXT_read_format_bgra") || + ext.Have("GL_EXT_bgra"))) { enable_read_format_bgra = true; } diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index ad33868..e544365 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -3292,7 +3292,7 @@ void GLES2DecoderImpl::DoDrawArrays( // We have to check this here because the prototype for glDrawArrays // is GLint not GLsizei. if (first < 0) { - SetGLError(GL_INVALID_ENUM, "glDrawArrays: first < 0"); + SetGLError(GL_INVALID_VALUE, "glDrawArrays: first < 0"); return; } |