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

Unified Diff: ui/gl/gl_surface_win.cc

Issue 196403008: gl: Move platform-specific EGL code into separate files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again, ARGH 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_surface_ozone.cc ('k') | ui/gl/gl_surface_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_win.cc
diff --git a/ui/gl/gl_surface_win.cc b/ui/gl/gl_surface_win.cc
index 71812de087e2a5d1eb4aacabb31b6f28acde7e37..c0a223b76082056c42a2175ce8254ac90d1a0e35 100644
--- a/ui/gl/gl_surface_win.cc
+++ b/ui/gl/gl_surface_win.cc
@@ -6,6 +6,7 @@
#include <dwmapi.h>
+#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -20,6 +21,12 @@
#include "ui/gl/gl_surface_stub.h"
#include "ui/gl/gl_surface_wgl.h"
+// From ANGLE's egl/eglext.h.
+#if !defined(EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE)
+#define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE \
+ reinterpret_cast<EGLNativeDisplayType>(-2)
+#endif
+
namespace gfx {
// This OSMesa GL surface can use GDI to swap the contents of the buffer to a
@@ -287,4 +294,11 @@ scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
}
}
+EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11))
+ return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE;
+
+ return EGL_DEFAULT_DISPLAY;
+}
+
} // namespace gfx
« no previous file with comments | « ui/gl/gl_surface_ozone.cc ('k') | ui/gl/gl_surface_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698