summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-02 18:37:51 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-02 18:37:51 +0000
commit23f77116cafe9a88819b60c7606453ae0db8f35d (patch)
treeaacf7537fca0c887449f46980b992bf26f107d38 /gpu
parentef42e30fbfcd6db1c2a5ed77818db2329b5bd1a8 (diff)
downloadchromium_src-23f77116cafe9a88819b60c7606453ae0db8f35d.zip
chromium_src-23f77116cafe9a88819b60c7606453ae0db8f35d.tar.gz
chromium_src-23f77116cafe9a88819b60c7606453ae0db8f35d.tar.bz2
More POSIX support for Chromium, consisting mostly of broadening ifdefs. This
patch cuts across modules, as there's only a handful necessary for each, with the most in chrome/test/. ALSA is enabled on FreeBSD and Solaris, as libasound has been ported to those two platforms, and I moved resolv.h in host_resolver_proc.cc, because it depends on headers from sys_addrinfo.h on FreeBSD. Patch by ruben (chromium@hybridsource.org) Review URL: http://codereview.chromium.org/6976055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87641 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc2
-rw-r--r--gpu/demos/demos.gyp4
-rw-r--r--gpu/demos/framework/main_exe.cc8
-rw-r--r--gpu/gles2_conform_support/gles2_conform_support.gyp4
-rw-r--r--gpu/gles2_conform_support/native/main.cc8
5 files changed, 13 insertions, 13 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index dec7c34..5f29545 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2629,7 +2629,7 @@ void GLES2DecoderImpl::DoCopyTextureToParentTextureCHROMIUM(
}
void GLES2DecoderImpl::DoResizeCHROMIUM(GLuint width, GLuint height) {
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Make sure that we are done drawing to the back buffer before resizing.
glFinish();
#endif
diff --git a/gpu/demos/demos.gyp b/gpu/demos/demos.gyp
index 4da7107..d9e60fc 100644
--- a/gpu/demos/demos.gyp
+++ b/gpu/demos/demos.gyp
@@ -14,7 +14,7 @@
# also be compiled with -fPIC flag. Setting GYP_DEFINES="linux_fpic=1"
# compiles everything with -fPIC. Disable pepper demos on linux/x64
# unless linux_fpic is 1.
- ['OS=="linux" and (target_arch=="x64" or target_arch=="arm") and linux_fpic!=1', {
+ ['os_posix == 1 and OS != "mac" and (target_arch=="x64" or target_arch=="arm") and linux_fpic!=1', {
'enable_pepper_demos%': 0,
}, {
'enable_pepper_demos%': 1,
@@ -107,7 +107,7 @@
],
},
'conditions': [
- ['OS=="linux"', {
+ ['os_posix == 1 and OS != "mac"', {
# -gstabs, used in the official builds, causes an ICE. Remove it.
'cflags!': ['-gstabs'],
}],
diff --git a/gpu/demos/framework/main_exe.cc b/gpu/demos/framework/main_exe.cc
index 0c54804..296d164 100644
--- a/gpu/demos/framework/main_exe.cc
+++ b/gpu/demos/framework/main_exe.cc
@@ -8,9 +8,9 @@
#include "gpu/demos/framework/window.h"
#include "ui/gfx/gl/gl_surface.h"
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
#include <gtk/gtk.h>
-#endif // OS_LINUX
+#endif // TOOLKIT_USES_GTK
namespace {
static const int kWindowWidth = 512;
@@ -18,9 +18,9 @@ static const int kWindowHeight = 512;
} // namespace.
int main(int argc, char** argv) {
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
gtk_init(&argc, &argv);
-#endif // OS_LINUX
+#endif // TOOLKIT_USES_GTK
// AtExitManager is used by singleton classes to delete themselves when
// the program terminates.
diff --git a/gpu/gles2_conform_support/gles2_conform_support.gyp b/gpu/gles2_conform_support/gles2_conform_support.gyp
index 45737d4..d0ed80a 100644
--- a/gpu/gles2_conform_support/gles2_conform_support.gyp
+++ b/gpu/gles2_conform_support/gles2_conform_support.gyp
@@ -54,7 +54,7 @@
'egl_native',
],
'conditions': [
- ['OS=="linux"', {
+ ['toolkit_uses_gtk == 1', {
'dependencies': ['../../build/linux/system.gyp:gtk'],
}],
],
@@ -76,7 +76,7 @@
'<(DEPTH)/third_party/expat/expat.gyp:expat',
],
'conditions': [
- ['OS=="linux"', {
+ ['toolkit_uses_gtk == 1', {
'dependencies': ['../../build/linux/system.gyp:gtk'],
}],
],
diff --git a/gpu/gles2_conform_support/native/main.cc b/gpu/gles2_conform_support/native/main.cc
index 032318cf..fd3dc75 100644
--- a/gpu/gles2_conform_support/native/main.cc
+++ b/gpu/gles2_conform_support/native/main.cc
@@ -5,9 +5,9 @@
#include "base/at_exit.h"
#include "base/message_loop.h"
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
#include <gtk/gtk.h>
-#endif // OS_LINUX
+#endif
extern "C" {
#if defined(GLES2_CONFORM_SUPPORT_ONLY)
@@ -18,9 +18,9 @@ extern "C" {
}
int main(int argc, char *argv[]) {
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
gtk_init(&argc, &argv);
-#endif // OS_LINUX
+#endif
base::AtExitManager at_exit;
MessageLoopForUI message_loop;