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

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

Issue 189543017: Revert 254571 "Remove the enable-d3d11 flag so that d3d11 is ena..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/content/test/gpu/page_sets/pixel_tests.json ('k') | trunk/src/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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 bool GLSurfaceEGL::InitializeOneOff() { 125 bool GLSurfaceEGL::InitializeOneOff() {
126 static bool initialized = false; 126 static bool initialized = false;
127 if (initialized) 127 if (initialized)
128 return true; 128 return true;
129 129
130 #if defined(USE_X11) 130 #if defined(USE_X11)
131 g_native_display = base::MessagePumpForUI::GetDefaultXDisplay(); 131 g_native_display = base::MessagePumpForUI::GetDefaultXDisplay();
132 #elif defined(OS_WIN) 132 #elif defined(OS_WIN)
133 g_native_display = EGL_DEFAULT_DISPLAY; 133 g_native_display = EGL_DEFAULT_DISPLAY;
134 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11)) { 134 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) &&
135 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableD3D11)) {
135 g_native_display = EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; 136 g_native_display = EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE;
136 } 137 }
137 #elif defined(USE_OZONE) 138 #elif defined(USE_OZONE)
138 gfx::SurfaceFactoryOzone* surface_factory = 139 gfx::SurfaceFactoryOzone* surface_factory =
139 gfx::SurfaceFactoryOzone::GetInstance(); 140 gfx::SurfaceFactoryOzone::GetInstance();
140 if (surface_factory->InitializeHardware() != 141 if (surface_factory->InitializeHardware() !=
141 gfx::SurfaceFactoryOzone::INITIALIZED) { 142 gfx::SurfaceFactoryOzone::INITIALIZED) {
142 LOG(ERROR) << "OZONE failed to initialize hardware"; 143 LOG(ERROR) << "OZONE failed to initialize hardware";
143 return false; 144 return false;
144 } 145 }
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 } 867 }
867 default: 868 default:
868 NOTREACHED(); 869 NOTREACHED();
869 return NULL; 870 return NULL;
870 } 871 }
871 } 872 }
872 873
873 #endif 874 #endif
874 875
875 } // namespace gfx 876 } // namespace gfx
OLDNEW
« no previous file with comments | « trunk/src/content/test/gpu/page_sets/pixel_tests.json ('k') | trunk/src/ui/gl/gl_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698