summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 18:11:13 +0000
committerzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 18:11:13 +0000
commite72fd5a245763aef78abcfc745895d9ff559c0ca (patch)
treeedd8b102bc343acf4233b2af4063eb9cfa376ec0
parent6b92a571dba42c8a26e7ab6cb0924bdf995ebc76 (diff)
downloadchromium_src-e72fd5a245763aef78abcfc745895d9ff559c0ca.zip
chromium_src-e72fd5a245763aef78abcfc745895d9ff559c0ca.tar.gz
chromium_src-e72fd5a245763aef78abcfc745895d9ff559c0ca.tar.bz2
Fix the mesa gl issue in chrome.
BUG=58343 TEST=none Review URL: http://codereview.chromium.org/3860004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63236 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/chrome_exe.gypi21
-rw-r--r--chrome/gpu/gpu_info_collector_mac.mm6
2 files changed, 26 insertions, 1 deletions
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index 00be5df..ebea4b5 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -461,6 +461,27 @@
},
],
'conditions': [
+ # http://code.google.com/p/chromium/issues/detail?id=18337
+ ['target_arch!="x64" and target_arch!="arm"', {
+ 'targets': [
+ {
+ 'target_name': 'chrome_mesa',
+ 'type': 'none',
+ 'dependencies': [
+ 'chrome',
+ '../third_party/mesa/mesa.gyp:osmesa',
+ ],
+ 'conditions': [
+ ['OS=="mac"', {
+ 'copies': [{
+ 'destination': '<(PRODUCT_DIR)/<(branding).app/Contents/Versions/<(version_full)/<(branding) Helper.app/Contents/MacOS/',
+ 'files': ['<(PRODUCT_DIR)/osmesa.so'],
+ }],
+ }],
+ ],
+ },
+ ],
+ }],
['OS=="win"', {
'targets': [
{
diff --git a/chrome/gpu/gpu_info_collector_mac.mm b/chrome/gpu/gpu_info_collector_mac.mm
index b5212d7..02c12b0 100644
--- a/chrome/gpu/gpu_info_collector_mac.mm
+++ b/chrome/gpu/gpu_info_collector_mac.mm
@@ -7,12 +7,14 @@
#include "base/scoped_ptr.h"
#include "base/string_piece.h"
#include "base/sys_string_conversions.h"
+#include "app/gfx/gl/gl_bindings.h"
#include "app/gfx/gl/gl_context.h"
+#include "app/gfx/gl/gl_implementation.h"
+#include "app/gfx/gl/gl_interface.h"
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import <IOKit/IOKitLib.h>
-#import <OpenGL/gl.h>
namespace gpu_info_collector {
@@ -128,6 +130,8 @@ static std::wstring CollectGLInfo(int *out_gl_version,
bool CollectGraphicsInfo(GPUInfo* gpu_info) {
+ if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL)
+ return false;
// Video Card data.
int vendor_id = 0, device_id = 0;
// OpenGL data.