| OLD | NEW |
| 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.h" | 5 #include "ui/gl/gl_surface.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #if !defined(EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE) | 24 #if !defined(EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE) |
| 25 #define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE \ | 25 #define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE \ |
| 26 reinterpret_cast<EGLNativeDisplayType>(-2) | 26 reinterpret_cast<EGLNativeDisplayType>(-2) |
| 27 #endif | 27 #endif |
| 28 #if !defined(EGL_PLATFORM_ANGLE_ANGLE) | 28 #if !defined(EGL_PLATFORM_ANGLE_ANGLE) |
| 29 #define EGL_PLATFORM_ANGLE_ANGLE 0x3201 | 29 #define EGL_PLATFORM_ANGLE_ANGLE 0x3201 |
| 30 #endif | 30 #endif |
| 31 #if !defined(EGL_PLATFORM_ANGLE_TYPE_ANGLE) | 31 #if !defined(EGL_PLATFORM_ANGLE_TYPE_ANGLE) |
| 32 #define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3202 | 32 #define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3202 |
| 33 #endif | 33 #endif |
| 34 #if !defined(EGL_PLATFORM_ANGLE_TYPE_D3D11_WARP_ANGLE) | 34 #if !defined(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE) |
| 35 #define EGL_PLATFORM_ANGLE_TYPE_D3D11_WARP_ANGLE 0x3206 | 35 #define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3207 |
| 36 #endif |
| 37 #if !defined(EGL_PLATFORM_ANGLE_USE_WARP_ANGLE) |
| 38 #define EGL_PLATFORM_ANGLE_USE_WARP_ANGLE 0x3208 |
| 36 #endif | 39 #endif |
| 37 | 40 |
| 38 namespace gfx { | 41 namespace gfx { |
| 39 | 42 |
| 40 // This OSMesa GL surface can use GDI to swap the contents of the buffer to a | 43 // This OSMesa GL surface can use GDI to swap the contents of the buffer to a |
| 41 // view. | 44 // view. |
| 42 class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa { | 45 class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa { |
| 43 public: | 46 public: |
| 44 explicit NativeViewGLSurfaceOSMesa(gfx::AcceleratedWidget window); | 47 explicit NativeViewGLSurfaceOSMesa(gfx::AcceleratedWidget window); |
| 45 virtual ~NativeViewGLSurfaceOSMesa(); | 48 virtual ~NativeViewGLSurfaceOSMesa(); |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 } | 353 } |
| 351 | 354 |
| 352 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { | 355 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
| 353 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) || | 356 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) || |
| 354 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp)) | 357 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp)) |
| 355 return GetDC(NULL); | 358 return GetDC(NULL); |
| 356 return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; | 359 return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; |
| 357 } | 360 } |
| 358 | 361 |
| 359 } // namespace gfx | 362 } // namespace gfx |
| OLD | NEW |