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

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

Issue 1609113002: Enable DirectComposition by default (reland) (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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 g_egl_window_fixed_size_supported = 390 g_egl_window_fixed_size_supported =
391 HasEGLExtension("EGL_ANGLE_window_fixed_size"); 391 HasEGLExtension("EGL_ANGLE_window_fixed_size");
392 g_egl_surface_orientation_supported = 392 g_egl_surface_orientation_supported =
393 HasEGLExtension("EGL_ANGLE_surface_orientation"); 393 HasEGLExtension("EGL_ANGLE_surface_orientation");
394 394
395 // Need EGL_ANGLE_flexible_surface_compatibility to allow surfaces with and 395 // Need EGL_ANGLE_flexible_surface_compatibility to allow surfaces with and
396 // without alpha to be bound to the same context. 396 // without alpha to be bound to the same context.
397 g_use_direct_composition = 397 g_use_direct_composition =
398 HasEGLExtension("EGL_ANGLE_direct_composition") && 398 HasEGLExtension("EGL_ANGLE_direct_composition") &&
399 HasEGLExtension("EGL_ANGLE_flexible_surface_compatibility") && 399 HasEGLExtension("EGL_ANGLE_flexible_surface_compatibility") &&
400 base::CommandLine::ForCurrentProcess()->HasSwitch( 400 !base::CommandLine::ForCurrentProcess()->HasSwitch(
401 switches::kUseDirectComposition); 401 switches::kDisableDirectComposition);
402 402
403 // TODO(oetuaho@nvidia.com): Surfaceless is disabled on Android as a temporary 403 // TODO(oetuaho@nvidia.com): Surfaceless is disabled on Android as a temporary
404 // workaround, since code written for Android WebView takes different paths 404 // workaround, since code written for Android WebView takes different paths
405 // based on whether GL surface objects have underlying EGL surface handles, 405 // based on whether GL surface objects have underlying EGL surface handles,
406 // conflicting with the use of surfaceless. See https://crbug.com/382349 406 // conflicting with the use of surfaceless. See https://crbug.com/382349
407 #if defined(OS_ANDROID) 407 #if defined(OS_ANDROID)
408 DCHECK(!g_egl_surfaceless_context_supported); 408 DCHECK(!g_egl_surfaceless_context_supported);
409 #else 409 #else
410 // Check if SurfacelessEGL is supported. 410 // Check if SurfacelessEGL is supported.
411 g_egl_surfaceless_context_supported = 411 g_egl_surfaceless_context_supported =
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 } 1033 }
1034 1034
1035 void* SurfacelessEGL::GetShareHandle() { 1035 void* SurfacelessEGL::GetShareHandle() {
1036 return NULL; 1036 return NULL;
1037 } 1037 }
1038 1038
1039 SurfacelessEGL::~SurfacelessEGL() { 1039 SurfacelessEGL::~SurfacelessEGL() {
1040 } 1040 }
1041 1041
1042 } // namespace gfx 1042 } // 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