summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 06:54:06 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 06:54:06 +0000
commit638235b0ef2c3e12f6ceecf05f89caf46b311d81 (patch)
treeb676ad477a68bad89cd6a35dff9d4e791cef5692 /chrome
parent48c27f7fac6bb5cf9cc995df8a68d4f6d4c10600 (diff)
downloadchromium_src-638235b0ef2c3e12f6ceecf05f89caf46b311d81.zip
chromium_src-638235b0ef2c3e12f6ceecf05f89caf46b311d81.tar.gz
chromium_src-638235b0ef2c3e12f6ceecf05f89caf46b311d81.tar.bz2
Fix the ARM build which can't find OpenGL. This adds a new define which I use
to detect X and GL related build options. On ARM, this means we don't compile the accelerated backing store even though its Linux. BUG=none TEST=none Review URL: http://codereview.chromium.org/546144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rwxr-xr-xchrome/chrome.gyp3
-rw-r--r--chrome/gpu/gpu_config.h20
-rw-r--r--chrome/gpu/gpu_main.cc5
-rw-r--r--chrome/gpu/gpu_thread.cc9
-rw-r--r--chrome/gpu/gpu_thread.h7
-rw-r--r--chrome/gpu/x_util.h1
6 files changed, 35 insertions, 10 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 01a1f52..1dc7541 100755
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -590,6 +590,7 @@
'sources': [
'gpu/gpu_backing_store_win.cc',
'gpu/gpu_backing_store_win.h',
+ 'gpu/gpu_config.h',
'gpu/gpu_main.cc',
'gpu/gpu_process.cc',
'gpu/gpu_process.h',
@@ -607,7 +608,7 @@
'third_party/wtl/include',
],
}],
- ['OS=="linux"', {
+ ['OS=="linux" and target_arch!="arm"', {
'sources': [
'gpu/gpu_backing_store_glx.cc',
'gpu/gpu_backing_store_glx.h',
diff --git a/chrome/gpu/gpu_config.h b/chrome/gpu/gpu_config.h
new file mode 100644
index 0000000..1894a65
--- /dev/null
+++ b/chrome/gpu/gpu_config.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_GPU_GPU_CONFIG_H_
+#define CHROME_GPU_GPU_CONFIG_H_
+
+// This file declares common preprocessor configuration for the GPU process.
+
+#include "build/build_config.h"
+
+#if defined(OS_LINUX) && !defined(ARCH_CPU_X86)
+
+// Only define GLX support for Intel CPUs for now until we can get the
+// proper dependencies and build setup for ARM.
+#define GPU_USE_GLX
+
+#endif
+
+#endif // CHROME_GPU_GPU_CONFIG_H_
diff --git a/chrome/gpu/gpu_main.cc b/chrome/gpu/gpu_main.cc
index 8dd5cc4..c633025 100644
--- a/chrome/gpu/gpu_main.cc
+++ b/chrome/gpu/gpu_main.cc
@@ -6,6 +6,7 @@
#include "build/build_config.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/main_function_params.h"
+#include "chrome/gpu/gpu_config.h"
#include "chrome/gpu/gpu_process.h"
#include "chrome/gpu/gpu_thread.h"
@@ -15,7 +16,7 @@
#if defined(OS_WIN)
#include "app/win_util.h"
-#elif defined(OS_LINUX)
+#elif defined(GPU_USE_GLX)
#include <dlfcn.h>
#include <GL/glxew.h>
#endif
@@ -33,7 +34,7 @@ int GpuMain(const MainFunctionParams& parameters) {
#if defined(OS_WIN)
win_util::ScopedCOMInitializer com_initializer;
-#elif defined(OS_LINUX)
+#elif defined(GPU_USE_GLX)
dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
glxewInit();
#endif
diff --git a/chrome/gpu/gpu_thread.cc b/chrome/gpu/gpu_thread.cc
index 4845b3a..4c9a974 100644
--- a/chrome/gpu/gpu_thread.cc
+++ b/chrome/gpu/gpu_thread.cc
@@ -6,10 +6,11 @@
#include "build/build_config.h"
#include "chrome/common/gpu_messages.h"
+#include "chrome/gpu/gpu_config.h"
#if defined(OS_WIN)
#include "chrome/gpu/gpu_view_win.h"
-#elif defined(OS_LINUX)
+#elif defined(GPU_USE_GLX)
#include "chrome/gpu/gpu_backing_store_glx_context.h"
#include "chrome/gpu/gpu_view_x.h"
@@ -17,7 +18,7 @@
#endif
GpuThread::GpuThread() {
-#if defined(OS_LINUX)
+#if defined(GPU_USE_GLX)
display_ = ::XOpenDisplay(NULL);
#endif
}
@@ -25,7 +26,7 @@ GpuThread::GpuThread() {
GpuThread::~GpuThread() {
}
-#if defined(OS_LINUX)
+#if defined(GPU_USE_GLX)
GpuBackingStoreGLXContext* GpuThread::GetGLXContext() {
if (!glx_context_.get())
glx_context_.reset(new GpuBackingStoreGLXContext(this));
@@ -48,7 +49,7 @@ void GpuThread::OnNewRenderWidgetHostView(GpuNativeWindowHandle parent_window,
// lifetime of this object.
#if defined(OS_WIN)
new GpuViewWin(this, parent_window, routing_id);
-#elif defined(OS_LINUX)
+#elif defined(GPU_USE_GLX)
new GpuViewX(this, parent_window, routing_id);
#else
NOTIMPLEMENTED();
diff --git a/chrome/gpu/gpu_thread.h b/chrome/gpu/gpu_thread.h
index 8e8300d8..f58db07 100644
--- a/chrome/gpu/gpu_thread.h
+++ b/chrome/gpu/gpu_thread.h
@@ -11,9 +11,10 @@
#include "build/build_config.h"
#include "chrome/common/child_thread.h"
#include "chrome/common/gpu_native_window_handle.h"
+#include "chrome/gpu/gpu_config.h"
#include "chrome/gpu/x_util.h"
-#if defined(OS_LINUX)
+#if defined(GPU_USE_GLX)
class GpuBackingStoreGLXContext;
#endif
@@ -22,7 +23,7 @@ class GpuThread : public ChildThread {
GpuThread();
~GpuThread();
-#if defined(OS_LINUX)
+#if defined(GPU_USE_GLX)
GpuBackingStoreGLXContext* GetGLXContext();
Display* display() const { return display_; }
@@ -36,7 +37,7 @@ class GpuThread : public ChildThread {
void OnNewRenderWidgetHostView(GpuNativeWindowHandle parent_window,
int32 routing_id);
-#if defined(OS_LINUX)
+#if defined(GPU_USE_GLX)
Display* display_;
scoped_ptr<GpuBackingStoreGLXContext> glx_context_;
#endif
diff --git a/chrome/gpu/x_util.h b/chrome/gpu/x_util.h
index bfdc983..512b232 100644
--- a/chrome/gpu/x_util.h
+++ b/chrome/gpu/x_util.h
@@ -9,6 +9,7 @@
// be a NOP on non-Linux ones.
#include "build/build_config.h"
+#include "chrome/gpu/gpu_config.h"
#if defined(OS_LINUX)