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

Side by Side Diff: ui/gl/gl_surface_egl.cc

Issue 1573913009: Revert of Enable DirectComposition by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « gpu/config/gpu_driver_bug_workaround_type.h ('k') | ui/gl/gl_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gl/gl_surface_egl.h" 5 #include "ui/gl/gl_surface_egl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 g_egl_window_fixed_size_supported = 385 g_egl_window_fixed_size_supported =
386 HasEGLExtension("EGL_ANGLE_window_fixed_size"); 386 HasEGLExtension("EGL_ANGLE_window_fixed_size");
387 g_egl_surface_orientation_supported = 387 g_egl_surface_orientation_supported =
388 HasEGLExtension("EGL_ANGLE_surface_orientation"); 388 HasEGLExtension("EGL_ANGLE_surface_orientation");
389 389
390 // Need EGL_ANGLE_flexible_surface_compatibility to allow surfaces with and 390 // Need EGL_ANGLE_flexible_surface_compatibility to allow surfaces with and
391 // without alpha to be bound to the same context. 391 // without alpha to be bound to the same context.
392 g_use_direct_composition = 392 g_use_direct_composition =
393 HasEGLExtension("EGL_ANGLE_direct_composition") && 393 HasEGLExtension("EGL_ANGLE_direct_composition") &&
394 HasEGLExtension("EGL_ANGLE_flexible_surface_compatibility") && 394 HasEGLExtension("EGL_ANGLE_flexible_surface_compatibility") &&
395 !base::CommandLine::ForCurrentProcess()->HasSwitch( 395 base::CommandLine::ForCurrentProcess()->HasSwitch(
396 switches::kDisableDirectComposition); 396 switches::kUseDirectComposition);
397 397
398 // TODO(oetuaho@nvidia.com): Surfaceless is disabled on Android as a temporary 398 // TODO(oetuaho@nvidia.com): Surfaceless is disabled on Android as a temporary
399 // workaround, since code written for Android WebView takes different paths 399 // workaround, since code written for Android WebView takes different paths
400 // based on whether GL surface objects have underlying EGL surface handles, 400 // based on whether GL surface objects have underlying EGL surface handles,
401 // conflicting with the use of surfaceless. See https://crbug.com/382349 401 // conflicting with the use of surfaceless. See https://crbug.com/382349
402 #if defined(OS_ANDROID) 402 #if defined(OS_ANDROID)
403 DCHECK(!g_egl_surfaceless_context_supported); 403 DCHECK(!g_egl_surfaceless_context_supported);
404 #else 404 #else
405 // Check if SurfacelessEGL is supported. 405 // Check if SurfacelessEGL is supported.
406 g_egl_surfaceless_context_supported = 406 g_egl_surfaceless_context_supported =
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 } 1024 }
1025 1025
1026 void* SurfacelessEGL::GetShareHandle() { 1026 void* SurfacelessEGL::GetShareHandle() {
1027 return NULL; 1027 return NULL;
1028 } 1028 }
1029 1029
1030 SurfacelessEGL::~SurfacelessEGL() { 1030 SurfacelessEGL::~SurfacelessEGL() {
1031 } 1031 }
1032 1032
1033 } // namespace gfx 1033 } // namespace gfx
OLDNEW
« no previous file with comments | « gpu/config/gpu_driver_bug_workaround_type.h ('k') | ui/gl/gl_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698