summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 12:54:20 +0000
committerbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 12:54:20 +0000
commit433902586dfdde42550da6f7421708361220df8e (patch)
tree87034ea5c52a96a0726bbd39fce0a17ae7ce1ccf /ui
parentf1c3be5280bcbecfb13dd2ad340ec2e889213f60 (diff)
downloadchromium_src-433902586dfdde42550da6f7421708361220df8e.zip
chromium_src-433902586dfdde42550da6f7421708361220df8e.tar.gz
chromium_src-433902586dfdde42550da6f7421708361220df8e.tar.bz2
Fix for stencil attachment of FBO.
Certain platforms to not support bundling the depth and stencil buffers. This code uses separate attachments when necessary. BUG=none TEST=run on a T25 device Review URL: http://codereview.chromium.org/7482033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94452 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/gl/gl_context_cgl.cc2
-rw-r--r--ui/gfx/gl/gl_context_egl.cc2
-rw-r--r--ui/gfx/gl/gl_context_glx.cc2
-rw-r--r--ui/gfx/gl/gl_context_osmesa.cc2
-rw-r--r--ui/gfx/gl/gl_context_wgl.cc2
-rw-r--r--ui/gfx/gl/gl_surface.cc4
-rw-r--r--ui/gfx/gl/gl_surface.h4
7 files changed, 11 insertions, 7 deletions
diff --git a/ui/gfx/gl/gl_context_cgl.cc b/ui/gfx/gl/gl_context_cgl.cc
index 9ba5b53..5598dd65 100644
--- a/ui/gfx/gl/gl_context_cgl.cc
+++ b/ui/gfx/gl/gl_context_cgl.cc
@@ -64,7 +64,7 @@ bool GLContextCGL::MakeCurrent(GLSurface* surface) {
return false;
}
- surface->OnMakeCurrent();
+ surface->OnMakeCurrent(this);
return true;
}
diff --git a/ui/gfx/gl/gl_context_egl.cc b/ui/gfx/gl/gl_context_egl.cc
index a61e52b..ba25498 100644
--- a/ui/gfx/gl/gl_context_egl.cc
+++ b/ui/gfx/gl/gl_context_egl.cc
@@ -95,7 +95,7 @@ bool GLContextEGL::MakeCurrent(GLSurface* surface) {
return false;
}
- surface->OnMakeCurrent();
+ surface->OnMakeCurrent(this);
return true;
}
diff --git a/ui/gfx/gl/gl_context_glx.cc b/ui/gfx/gl/gl_context_glx.cc
index 0921037..47238cc 100644
--- a/ui/gfx/gl/gl_context_glx.cc
+++ b/ui/gfx/gl/gl_context_glx.cc
@@ -171,7 +171,7 @@ bool GLContextGLX::MakeCurrent(GLSurface* surface) {
return false;
}
- surface->OnMakeCurrent();
+ surface->OnMakeCurrent(this);
return true;
}
diff --git a/ui/gfx/gl/gl_context_osmesa.cc b/ui/gfx/gl/gl_context_osmesa.cc
index a4396d4..a4dbf22 100644
--- a/ui/gfx/gl/gl_context_osmesa.cc
+++ b/ui/gfx/gl/gl_context_osmesa.cc
@@ -67,7 +67,7 @@ bool GLContextOSMesa::MakeCurrent(GLSurface* surface) {
// Row 0 is at the top.
OSMesaPixelStore(OSMESA_Y_UP, 0);
- surface->OnMakeCurrent();
+ surface->OnMakeCurrent(this);
return true;
}
diff --git a/ui/gfx/gl/gl_context_wgl.cc b/ui/gfx/gl/gl_context_wgl.cc
index 7d14b91..f86e955 100644
--- a/ui/gfx/gl/gl_context_wgl.cc
+++ b/ui/gfx/gl/gl_context_wgl.cc
@@ -82,7 +82,7 @@ bool GLContextWGL::MakeCurrent(GLSurface* surface) {
return false;
}
- surface->OnMakeCurrent();
+ surface->OnMakeCurrent(this);
return true;
}
diff --git a/ui/gfx/gl/gl_surface.cc b/ui/gfx/gl/gl_surface.cc
index 6242f80..399d816 100644
--- a/ui/gfx/gl/gl_surface.cc
+++ b/ui/gfx/gl/gl_surface.cc
@@ -4,6 +4,8 @@
#include "ui/gfx/gl/gl_surface.h"
+#include "ui/gfx/gl/gl_context.h"
+
namespace gfx {
GLSurface::GLSurface() {
@@ -21,7 +23,7 @@ unsigned int GLSurface::GetBackingFrameBufferObject() {
return 0;
}
-void GLSurface::OnMakeCurrent() {
+void GLSurface::OnMakeCurrent(GLContext* context) {
}
} // namespace gfx
diff --git a/ui/gfx/gl/gl_surface.h b/ui/gfx/gl/gl_surface.h
index 5bd9180..1d6ddc2d 100644
--- a/ui/gfx/gl/gl_surface.h
+++ b/ui/gfx/gl/gl_surface.h
@@ -13,6 +13,8 @@
namespace gfx {
+class GLContext;
+
// Encapsulates a surface that can be rendered to with GL, hiding platform
// specific management.
class GLSurface : public base::RefCounted<GLSurface> {
@@ -48,7 +50,7 @@ class GLSurface : public base::RefCounted<GLSurface> {
static bool InitializeOneOff();
// Called after a context is made current with this surface.
- virtual void OnMakeCurrent();
+ virtual void OnMakeCurrent(GLContext* context);
#if !defined(OS_MACOSX)
// Create a GL surface that renders directly to a view.