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

Unified Diff: android_webview/browser/surfaces_instance.cc

Issue 2360963004: aw: Fix FBO restore bug (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « android_webview/browser/surfaces_instance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/surfaces_instance.cc
diff --git a/android_webview/browser/surfaces_instance.cc b/android_webview/browser/surfaces_instance.cc
index b418075f9d02427ef326b33254fe3d53e4f86405..f089b1642a49d926510b30fe20d2f7a60d6f9332 100644
--- a/android_webview/browser/surfaces_instance.cc
+++ b/android_webview/browser/surfaces_instance.cc
@@ -32,15 +32,19 @@ SurfacesInstance* g_surfaces_instance = nullptr;
} // namespace
// static
-scoped_refptr<SurfacesInstance> SurfacesInstance::GetOrCreateInstance() {
- if (g_surfaces_instance)
+scoped_refptr<SurfacesInstance> SurfacesInstance::GetOrCreateInstance(
+ int framebuffer_binding_ext) {
+ if (g_surfaces_instance) {
+ g_surfaces_instance->SetBackingFrameBufferObject(framebuffer_binding_ext);
return make_scoped_refptr(g_surfaces_instance);
- return make_scoped_refptr(new SurfacesInstance);
+ }
+ return make_scoped_refptr(new SurfacesInstance(framebuffer_binding_ext));
}
-SurfacesInstance::SurfacesInstance()
+SurfacesInstance::SurfacesInstance(int framebuffer_binding_ext)
: next_surface_id_namespace_(1u),
gl_surface_(new AwGLSurface) {
+ gl_surface_->SetBackingFrameBufferObject(framebuffer_binding_ext);
cc::RendererSettings settings;
// Should be kept in sync with compositor_impl_android.cc.
« no previous file with comments | « android_webview/browser/surfaces_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698