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

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

Issue 18501018: Enable ANGLE D3D11 runtime for Windows 7+. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return true; 101 return true;
102 102
103 #if defined (USE_OZONE) 103 #if defined (USE_OZONE)
104 ui::SurfaceFactoryOzone::GetInstance()->InitializeHardware(); 104 ui::SurfaceFactoryOzone::GetInstance()->InitializeHardware();
105 #endif 105 #endif
106 106
107 #if defined(USE_X11) 107 #if defined(USE_X11)
108 g_native_display = base::MessagePumpForUI::GetDefaultXDisplay(); 108 g_native_display = base::MessagePumpForUI::GetDefaultXDisplay();
109 #elif defined(OS_WIN) 109 #elif defined(OS_WIN)
110 g_native_display = EGL_DEFAULT_DISPLAY; 110 g_native_display = EGL_DEFAULT_DISPLAY;
111 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableD3D11)) 111 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) ||
112 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableD3D11)) {
112 g_native_display = EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; 113 g_native_display = EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE;
114 }
113 #else 115 #else
114 g_native_display = EGL_DEFAULT_DISPLAY; 116 g_native_display = EGL_DEFAULT_DISPLAY;
115 #endif 117 #endif
116 g_display = eglGetDisplay(g_native_display); 118 g_display = eglGetDisplay(g_native_display);
117 if (!g_display) { 119 if (!g_display) {
118 LOG(ERROR) << "eglGetDisplay failed with error " << GetLastEGLErrorString(); 120 LOG(ERROR) << "eglGetDisplay failed with error " << GetLastEGLErrorString();
119 return false; 121 return false;
120 } 122 }
121 123
122 if (!eglInitialize(g_display, NULL, NULL)) { 124 if (!eglInitialize(g_display, NULL, NULL)) {
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 } 675 }
674 default: 676 default:
675 NOTREACHED(); 677 NOTREACHED();
676 return NULL; 678 return NULL;
677 } 679 }
678 } 680 }
679 681
680 #endif 682 #endif
681 683
682 } // namespace gfx 684 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698