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 27 matching lines...) Expand all Loading... |
38 namespace gfx { | 38 namespace gfx { |
39 | 39 |
40 // This OSMesa GL surface can use GDI to swap the contents of the buffer to a | 40 // This OSMesa GL surface can use GDI to swap the contents of the buffer to a |
41 // view. | 41 // view. |
42 class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa { | 42 class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa { |
43 public: | 43 public: |
44 explicit NativeViewGLSurfaceOSMesa(gfx::AcceleratedWidget window); | 44 explicit NativeViewGLSurfaceOSMesa(gfx::AcceleratedWidget window); |
45 virtual ~NativeViewGLSurfaceOSMesa(); | 45 virtual ~NativeViewGLSurfaceOSMesa(); |
46 | 46 |
47 // Implement subset of GLSurface. | 47 // Implement subset of GLSurface. |
48 virtual bool Initialize() OVERRIDE; | 48 virtual bool Initialize() override; |
49 virtual void Destroy() OVERRIDE; | 49 virtual void Destroy() override; |
50 virtual bool IsOffscreen() OVERRIDE; | 50 virtual bool IsOffscreen() override; |
51 virtual bool SwapBuffers() OVERRIDE; | 51 virtual bool SwapBuffers() override; |
52 virtual bool SupportsPostSubBuffer() OVERRIDE; | 52 virtual bool SupportsPostSubBuffer() override; |
53 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; | 53 virtual bool PostSubBuffer(int x, int y, int width, int height) override; |
54 | 54 |
55 private: | 55 private: |
56 gfx::AcceleratedWidget window_; | 56 gfx::AcceleratedWidget window_; |
57 HDC device_context_; | 57 HDC device_context_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceOSMesa); | 59 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceOSMesa); |
60 }; | 60 }; |
61 | 61 |
62 class WinVSyncProvider : public VSyncProvider { | 62 class WinVSyncProvider : public VSyncProvider { |
63 public: | 63 public: |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 } | 349 } |
350 | 350 |
351 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { | 351 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
352 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) || | 352 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) || |
353 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp)) | 353 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp)) |
354 return GetDC(NULL); | 354 return GetDC(NULL); |
355 return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; | 355 return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; |
356 } | 356 } |
357 | 357 |
358 } // namespace gfx | 358 } // namespace gfx |
OLD | NEW |