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

Side by Side Diff: ui/gl/gl_surface_win.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « ui/gl/gl_surface_glx.cc ('k') | ui/gl/gl_surface_x11.cc » ('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 #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
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
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
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_glx.cc ('k') | ui/gl/gl_surface_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698