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

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

Issue 864943002: Replaces instances of the deprecated TimeTicks::HighResNow() with TimeTicks::Now(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More changes based on review comments. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « ui/events/latency_info.cc ('k') | ui/views/win/hwnd_message_handler.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 extern "C" { 5 extern "C" {
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 } 7 }
8 8
9 #include "ui/gl/gl_surface_glx.h" 9 #include "ui/gl/gl_surface_glx.h"
10 10
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (!context_ || cancel_vsync_flag_.IsSet()) 204 if (!context_ || cancel_vsync_flag_.IsSet())
205 return; 205 return;
206 206
207 glXMakeCurrent(display_, window_, context_); 207 glXMakeCurrent(display_, window_, context_);
208 208
209 unsigned int retrace_count = 0; 209 unsigned int retrace_count = 0;
210 if (glXWaitVideoSyncSGI(1, 0, &retrace_count) != 0) 210 if (glXWaitVideoSyncSGI(1, 0, &retrace_count) != 0)
211 return; 211 return;
212 212
213 TRACE_EVENT_INSTANT0("gpu", "vblank", TRACE_EVENT_SCOPE_THREAD); 213 TRACE_EVENT_INSTANT0("gpu", "vblank", TRACE_EVENT_SCOPE_THREAD);
214 now = base::TimeTicks::HighResNow(); 214 now = base::TimeTicks::Now();
215 215
216 glXMakeCurrent(display_, 0, 0); 216 glXMakeCurrent(display_, 0, 0);
217 } 217 }
218 218
219 const base::TimeDelta kDefaultInterval = 219 const base::TimeDelta kDefaultInterval =
220 base::TimeDelta::FromSeconds(1) / 60; 220 base::TimeDelta::FromSeconds(1) / 60;
221 221
222 task_runner_->PostTask( 222 task_runner_->PostTask(
223 FROM_HERE, base::Bind(callback, now, kDefaultInterval)); 223 FROM_HERE, base::Bind(callback, now, kDefaultInterval));
224 } 224 }
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 689
690 void* PbufferGLSurfaceGLX::GetConfig() { 690 void* PbufferGLSurfaceGLX::GetConfig() {
691 return config_; 691 return config_;
692 } 692 }
693 693
694 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { 694 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() {
695 Destroy(); 695 Destroy();
696 } 696 }
697 697
698 } // namespace gfx 698 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/events/latency_info.cc ('k') | ui/views/win/hwnd_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698