summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorklobag@chromium.org <klobag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 21:48:56 +0000
committerklobag@chromium.org <klobag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 21:48:56 +0000
commiteff9a22bfad4d956ad0392295cb498c77341ca72 (patch)
treebc7112b2b0ac17dac12018c4f390f3b1e9d75644 /app
parent8e574740bffe5733dfdb9960eeff6b5b47e384f3 (diff)
downloadchromium_src-eff9a22bfad4d956ad0392295cb498c77341ca72.zip
chromium_src-eff9a22bfad4d956ad0392295cb498c77341ca72.tar.gz
chromium_src-eff9a22bfad4d956ad0392295cb498c77341ca72.tar.bz2
Map the render process's glBindFramebuffer(0) to the context's backing FBO.
The default for the context's backing FBO is 0. If the context does have an internal FBO, it can return it so that glBindFramebuffer(0) will not detach the texture from it. Review URL: http://codereview.chromium.org/5987004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/gfx/gl/gl_context.cc4
-rw-r--r--app/gfx/gl/gl_context.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/app/gfx/gl/gl_context.cc b/app/gfx/gl/gl_context.cc
index 83c483b..2020d46 100644
--- a/app/gfx/gl/gl_context.cc
+++ b/app/gfx/gl/gl_context.cc
@@ -13,6 +13,10 @@
namespace gfx {
+unsigned int GLContext::GetBackingFrameBufferObject() {
+ return 0;
+}
+
std::string GLContext::GetExtensions() {
DCHECK(IsCurrent());
const char* ext = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
diff --git a/app/gfx/gl/gl_context.h b/app/gfx/gl/gl_context.h
index 5264c4a..f028704 100644
--- a/app/gfx/gl/gl_context.h
+++ b/app/gfx/gl/gl_context.h
@@ -45,6 +45,10 @@ class GLContext {
// Set swap interval. This context must be current.
virtual void SetSwapInterval(int interval) = 0;
+ // Returns the internal frame buffer object name if the context is backed by
+ // FBO. Otherwise returns 0.
+ virtual unsigned int GetBackingFrameBufferObject();
+
// Returns space separated list of extensions. The context must be current.
virtual std::string GetExtensions();