summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 13:49:18 +0000
committerbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 13:49:18 +0000
commitbdafc9605c34f4aaf8c44f862cd01befed7f561c (patch)
treeeecdcbd701d5a7e8f6481f12df2a2ddd51eae219
parent71902a8f019550db9241fcc70685a103f7816b9d (diff)
downloadchromium_src-bdafc9605c34f4aaf8c44f862cd01befed7f561c.zip
chromium_src-bdafc9605c34f4aaf8c44f862cd01befed7f561c.tar.gz
chromium_src-bdafc9605c34f4aaf8c44f862cd01befed7f561c.tar.bz2
Revert 78536 - Use gl_bindings instead of linking against OpenGL directly.
The GPU process uses gl_bindings to decide which GL library (OpenGL, OpenGL ES, or Angle) to link against at run-time. We should do the same. BUG=none TEST=by hand with 3D CSS and WebGL on Linux Review URL: http://codereview.chromium.org/6673094 TBR=backer@chromium.org Review URL: http://codereview.chromium.org/6665066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78537 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/app_base.gypi1
-rw-r--r--ui/gfx/compositor_gl.cc7
-rw-r--r--ui/gfx/gfx.gyp7
3 files changed, 12 insertions, 3 deletions
diff --git a/app/app_base.gypi b/app/app_base.gypi
index ef5d10d..9e98ce4 100644
--- a/app/app_base.gypi
+++ b/app/app_base.gypi
@@ -63,6 +63,7 @@
# target, but it doesn't work due to a bug in gyp
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
+ '../ui/gfx/gfx.gyp:gfx',
'../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../third_party/icu/icu.gyp:icui18n',
diff --git a/ui/gfx/compositor_gl.cc b/ui/gfx/compositor_gl.cc
index 5404792..39a57a1 100644
--- a/ui/gfx/compositor_gl.cc
+++ b/ui/gfx/compositor_gl.cc
@@ -4,8 +4,9 @@
#include "ui/gfx/compositor.h"
+#include <GL/gl.h>
+
#include "app/gfx/gl/gl_context.h"
-#include "app/gfx/gl/gl_bindings.h"
#include "app/gfx/gl/gl_implementation.h"
#include "base/scoped_ptr.h"
#include "base/basictypes.h"
@@ -17,7 +18,7 @@ namespace ui {
class CompositorGL : public Compositor {
public:
- explicit CompositorGL(gfx::AcceleratedWidget widget);
+ CompositorGL(gfx::AcceleratedWidget widget);
private:
// Overridden from Compositor.
@@ -62,9 +63,11 @@ void CompositorGL::DrawTextureWithTransform(TextureID txt,
}
void CompositorGL::SaveTransform() {
+ glPushMatrix();
}
void CompositorGL::RestoreTransform() {
+ glPopMatrix();
}
// static
diff --git a/ui/gfx/gfx.gyp b/ui/gfx/gfx.gyp
index 3e95531..2cfad23 100644
--- a/ui/gfx/gfx.gyp
+++ b/ui/gfx/gfx.gyp
@@ -68,6 +68,7 @@
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'dependencies': [
+ '../../app/app.gyp:app_base',
'../../build/linux/system.gyp:gtk',
],
}],
@@ -173,12 +174,16 @@
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'dependencies': [
- '../../app/app.gyp:app_base',
# font_gtk.cc uses fontconfig.
# TODO(evanm): I think this is wrong; it should just use GTK.
'../../build/linux/system.gyp:fontconfig',
'../../build/linux/system.gyp:gtk',
],
+ 'link_settings': {
+ 'libraries': [
+ '-lGL',
+ ],
+ },
'sources!': [
'compositor.cc',
],