From 380aba8992ae92cd78486b0672ef748912032cf5 Mon Sep 17 00:00:00 2001
From: "bsalomon@google.com"
 <bsalomon@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed, 21 Sep 2011 18:15:39 +0000
Subject: Fixes issues where WGC3D based on OSMesa GL implementation isn't
 allowing OES extensions that are supported.

TEST=none
BUG=none
Review URL: http://codereview.chromium.org/7980034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102135 0039d316-1c4b-4281-b951-d872f2087c98
---
 gpu/command_buffer/service/feature_info.cc | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'gpu')

diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 4936e7a..1e1a86c 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -232,8 +232,7 @@ void FeatureInfo::AddFeatures(const char* desired_features) {
   }
 
   if (ext.Desire("GL_OES_rgb8_rgba8")) {
-    if (ext.Have("GL_OES_rgb8_rgba8") ||
-        gfx::GetGLImplementation() == gfx::kGLImplementationDesktopGL) {
+    if (ext.Have("GL_OES_rgb8_rgba8") || gfx::HasDesktopGLFeatures()) {
       AddExtensionString("GL_OES_rgb8_rgba8");
       validators_.render_buffer_format.AddValue(GL_RGB8_OES);
       validators_.render_buffer_format.AddValue(GL_RGBA8_OES);
@@ -316,14 +315,13 @@ void FeatureInfo::AddFeatures(const char* desired_features) {
   }
 
   if (ext.HaveAndDesire("GL_OES_depth24") ||
-      (gfx::GetGLImplementation() == gfx::kGLImplementationDesktopGL &&
-       ext.Desire("GL_OES_depth24"))) {
+      (gfx::HasDesktopGLFeatures() && ext.Desire("GL_OES_depth24"))) {
     AddExtensionString("GL_OES_depth24");
     validators_.render_buffer_format.AddValue(GL_DEPTH_COMPONENT24);
   }
 
   if (ext.HaveAndDesire("GL_OES_standard_derivatives") ||
-      (gfx::GetGLImplementation() == gfx::kGLImplementationDesktopGL &&
+      (gfx::HasDesktopGLFeatures() &&
        ext.Desire("GL_OES_standard_derivatives"))) {
     AddExtensionString("GL_OES_standard_derivatives");
     feature_flags_.oes_standard_derivatives = true;
-- 
cgit v1.1