summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/feature_info.cc
diff options
context:
space:
mode:
authorkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-22 00:41:20 +0000
committerkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-22 00:41:20 +0000
commit7601c3f3fd5fe752da49e2f423d30b2ce7ba5055 (patch)
tree6bbd9ca28d5451c60432256945d9331b1292b6ad /gpu/command_buffer/service/feature_info.cc
parentd1e83b331605d593a753aa3c9854bdec1e9515c0 (diff)
downloadchromium_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/service/feature_info.cc')
-rw-r--r--gpu/command_buffer/service/feature_info.cc7
1 files changed, 5 insertions, 2 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;
}