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

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

Issue 24120004: Add an enable D3D11 flag and blacklist specific intel drivers and windows vista from using D3D11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed merge issue Created 7 years, 3 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_list_json.cc ('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 // This include must be here so that the includes provided transitively 5 // This include must be here so that the includes provided transitively
6 // by gl_surface_egl.h don't make it impossible to compile this code. 6 // by gl_surface_egl.h don't make it impossible to compile this code.
7 #include "third_party/mesa/src/include/GL/osmesa.h" 7 #include "third_party/mesa/src/include/GL/osmesa.h"
8 8
9 #include "ui/gl/gl_surface_egl.h" 9 #include "ui/gl/gl_surface_egl.h"
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 bool GLSurfaceEGL::InitializeOneOff() { 98 bool GLSurfaceEGL::InitializeOneOff() {
99 static bool initialized = false; 99 static bool initialized = false;
100 if (initialized) 100 if (initialized)
101 return true; 101 return true;
102 102
103 #if defined(USE_X11) 103 #if defined(USE_X11)
104 g_native_display = base::MessagePumpForUI::GetDefaultXDisplay(); 104 g_native_display = base::MessagePumpForUI::GetDefaultXDisplay();
105 #elif defined(OS_WIN) 105 #elif defined(OS_WIN)
106 g_native_display = EGL_DEFAULT_DISPLAY; 106 g_native_display = EGL_DEFAULT_DISPLAY;
107 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11)) { 107 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) &&
108 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableD3D11)) {
108 g_native_display = EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; 109 g_native_display = EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE;
109 } 110 }
110 #elif defined(USE_OZONE) 111 #elif defined(USE_OZONE)
111 ui::SurfaceFactoryOzone* surface_factory = 112 ui::SurfaceFactoryOzone* surface_factory =
112 ui::SurfaceFactoryOzone::GetInstance(); 113 ui::SurfaceFactoryOzone::GetInstance();
113 if (surface_factory->InitializeHardware() != 114 if (surface_factory->InitializeHardware() !=
114 ui::SurfaceFactoryOzone::INITIALIZED) { 115 ui::SurfaceFactoryOzone::INITIALIZED) {
115 LOG(ERROR) << "OZONE failed to initialize hardware"; 116 LOG(ERROR) << "OZONE failed to initialize hardware";
116 return false; 117 return false;
117 } 118 }
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 } 681 }
681 default: 682 default:
682 NOTREACHED(); 683 NOTREACHED();
683 return NULL; 684 return NULL;
684 } 685 }
685 } 686 }
686 687
687 #endif 688 #endif
688 689
689 } // namespace gfx 690 } // namespace gfx
OLDNEW
« no previous file with comments | « gpu/config/gpu_driver_bug_list_json.cc ('k') | ui/gl/gl_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698