Index: android_webview/browser/scoped_app_gl_state_restore.cc |
diff --git a/android_webview/browser/scoped_app_gl_state_restore.cc b/android_webview/browser/scoped_app_gl_state_restore.cc |
index 42fbb7e9776d8d5509552766887fcb0b9fffe8b0..52cc189b98ace1da6c54393e158de75418b700c4 100644 |
--- a/android_webview/browser/scoped_app_gl_state_restore.cc |
+++ b/android_webview/browser/scoped_app_gl_state_restore.cc |
@@ -17,6 +17,12 @@ namespace android_webview { |
namespace { |
+gl::GLContextAttribs GetAppContextAttribs() { |
+ gl::GLContextAttribs attribs; |
+ attribs.gpu_preference = gl::PreferDiscreteGpu; |
+ return attribs; |
+} |
+ |
// "App" context is a bit of a stretch. Basically we use this context while |
// saving and restoring the App GL state. |
class AppContextSurface { |
@@ -25,7 +31,7 @@ class AppContextSurface { |
: surface(new gl::GLSurfaceStub), |
context(gl::init::CreateGLContext(nullptr, |
surface.get(), |
- gl::PreferDiscreteGpu)) {} |
+ GetAppContextAttribs())) {} |
piman
2016/11/07 21:01:01
nit: the default GLContextAttribs would be perfect
Geoff Lang
2016/11/07 21:36:20
Done.
|
void MakeCurrent() { context->MakeCurrent(surface.get()); } |
private: |