Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(617)

Unified Diff: ui/gl/gl_surface_stub.cc

Issue 22066002: Add FBO support in Android WebView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address joth's comments Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gl/gl_surface_stub.cc
diff --git a/ui/gl/gl_surface_stub.cc b/ui/gl/gl_surface_stub.cc
index a27d2af6aba688565304b6b4a009f8d4c159f4de..cb3e16467684910350aa5298778fd0371f68794b 100644
--- a/ui/gl/gl_surface_stub.cc
+++ b/ui/gl/gl_surface_stub.cc
@@ -4,8 +4,19 @@
#include "ui/gl/gl_surface_stub.h"
+#include "ui/gl/gl_bindings.h"
+
namespace gfx {
+GLSurfaceStub::GLSurfaceStub() : fbo_(0) {}
+
+void GLSurfaceStub::SaveCurrentFBO() {
+ GLint fbo = 0;
+ glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &fbo);
+ DCHECK_GE(fbo, 0);
+ fbo_ = static_cast<unsigned int>(fbo);
+}
+
void GLSurfaceStub::Destroy() {
}
@@ -13,6 +24,10 @@ bool GLSurfaceStub::IsOffscreen() {
return false;
}
+unsigned int GLSurfaceStub::GetBackingFrameBufferObject() {
+ return fbo_;
+}
+
bool GLSurfaceStub::SwapBuffers() {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698