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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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: |
64 explicit WinVSyncProvider(gfx::AcceleratedWidget window) : | 64 explicit WinVSyncProvider(gfx::AcceleratedWidget window) : |
65 window_(window) | 65 window_(window) |
66 { | 66 { |
67 use_dwm_ = (base::win::GetVersion() >= base::win::VERSION_VISTA); | 67 use_dwm_ = (base::win::GetVersion() >= base::win::VERSION_WIN7); |
68 } | 68 } |
69 | 69 |
70 virtual ~WinVSyncProvider() {} | 70 virtual ~WinVSyncProvider() {} |
71 | 71 |
72 virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) { | 72 virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) { |
73 TRACE_EVENT0("gpu", "WinVSyncProvider::GetVSyncParameters"); | 73 TRACE_EVENT0("gpu", "WinVSyncProvider::GetVSyncParameters"); |
74 | 74 |
75 base::TimeTicks timebase; | 75 base::TimeTicks timebase; |
76 base::TimeDelta interval; | 76 base::TimeDelta interval; |
77 bool dwm_active = false; | 77 bool dwm_active = false; |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 } | 350 } |
351 | 351 |
352 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { | 352 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
353 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) || | 353 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) || |
354 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp)) | 354 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp)) |
355 return GetDC(NULL); | 355 return GetDC(NULL); |
356 return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; | 356 return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; |
357 } | 357 } |
358 | 358 |
359 } // namespace gfx | 359 } // namespace gfx |
OLD | NEW |