| Index: ui/gl/gl_surface_egl.cc
|
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
|
| index 9107bdd90ecb78b190fed84087f99d6a343974f8..1b15a4dcd208ed3a329920871c33d14bcd963306 100644
|
| --- a/ui/gl/gl_surface_egl.cc
|
| +++ b/ui/gl/gl_surface_egl.cc
|
| @@ -103,6 +103,7 @@ bool g_egl_create_context_robustness_supported = false;
|
| bool g_egl_sync_control_supported = false;
|
| bool g_egl_window_fixed_size_supported = false;
|
| bool g_egl_surfaceless_context_supported = false;
|
| +bool g_use_direct_composition = false;
|
|
|
| class EGLSyncControlVSyncProvider
|
| : public gfx::SyncControlVSyncProvider {
|
| @@ -361,6 +362,9 @@ bool GLSurfaceEGL::InitializeOneOff() {
|
| g_egl_window_fixed_size_supported =
|
| HasEGLExtension("EGL_ANGLE_window_fixed_size");
|
|
|
| + g_use_direct_composition = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kUseDirectComposition);
|
| +
|
| // TODO(oetuaho@nvidia.com): Surfaceless is disabled on Android as a temporary
|
| // workaround, since code written for Android WebView takes different paths
|
| // based on whether GL surface objects have underlying EGL surface handles,
|
| @@ -423,6 +427,10 @@ bool GLSurfaceEGL::IsEGLSurfacelessContextSupported() {
|
| return g_egl_surfaceless_context_supported;
|
| }
|
|
|
| +bool GLSurfaceEGL::IsDirectCompositionSupported() {
|
| + return g_use_direct_composition;
|
| +}
|
| +
|
| GLSurfaceEGL::~GLSurfaceEGL() {}
|
|
|
| // InitializeDisplay is necessary because the static binding code
|
| @@ -485,9 +493,10 @@ NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(EGLNativeWindowType window)
|
| : window_(window),
|
| config_(NULL),
|
| size_(1, 1),
|
| + alpha_(true),
|
| + enable_fixed_size_angle_(false),
|
| surface_(NULL),
|
| supports_post_sub_buffer_(false),
|
| - alpha_(true),
|
| swap_interval_(1) {
|
| #if defined(OS_ANDROID)
|
| if (window)
|
| @@ -525,7 +534,7 @@ bool NativeViewGLSurfaceEGL::Initialize(
|
|
|
| std::vector<EGLint> egl_window_attributes;
|
|
|
| - if (g_egl_window_fixed_size_supported) {
|
| + if (g_egl_window_fixed_size_supported && enable_fixed_size_angle_) {
|
| egl_window_attributes.push_back(EGL_FIXED_SIZE_ANGLE);
|
| egl_window_attributes.push_back(EGL_TRUE);
|
| egl_window_attributes.push_back(EGL_WIDTH);
|
|
|