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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 13140006: gpu: Fix Vivante's "hisilicon" GPUs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add FBO restore Created 7 years, 8 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 | « ui/gl/gl_surface_egl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 3b81daf83285a476768cb724f7facde9bbca8950..b57655651a041845d2fb9fb4bd0c91ff6e24ba59 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -399,18 +399,30 @@ bool NativeViewGLSurfaceEGL::Resize(const gfx::Size& size) {
if (was_current)
current_context->ReleaseCurrent(this);
- Destroy();
+ Recreate();
+
+ if (was_current)
+ return current_context->MakeCurrent(this);
+ return true;
+}
+bool NativeViewGLSurfaceEGL::Recreate() {
+ Destroy();
if (!Initialize()) {
- LOG(ERROR) << "Failed to resize pbuffer.";
+ LOG(ERROR) << "Failed to create surface.";
return false;
}
-
- if (was_current)
- return current_context->MakeCurrent(this);
return true;
}
+bool NativeViewGLSurfaceEGL::RecreateOnMakeCurrent() {
+ return recreate_on_make_current_;
+}
+
+void NativeViewGLSurfaceEGL::SetRecreateOnMakeCurrent(bool recreate) {
+ recreate_on_make_current_ = recreate;
+}
+
EGLSurface NativeViewGLSurfaceEGL::GetHandle() {
return surface_;
}
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698