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

Unified Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc

Issue 1888593004: Delete all use of tick_util.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
index e3a5f258a8100cd562be04f38a854d3ba52d1eb7..6b4308bb7a3917fdda197a7623541339faab7f76 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
@@ -14,6 +14,7 @@
#include <utility>
+#include "webrtc/base/timeutils.h"
#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "webrtc/modules/desktop_capture/desktop_frame.h"
#include "webrtc/modules/desktop_capture/desktop_frame_win.h"
@@ -24,7 +25,6 @@
#include "webrtc/modules/desktop_capture/win/desktop.h"
#include "webrtc/modules/desktop_capture/win/screen_capture_utils.h"
#include "webrtc/system_wrappers/include/logging.h"
-#include "webrtc/system_wrappers/include/tick_util.h"
namespace webrtc {
@@ -87,7 +87,7 @@ void ScreenCapturerWinMagnifier::SetSharedMemoryFactory(
}
void ScreenCapturerWinMagnifier::Capture(const DesktopRegion& region) {
- TickTime capture_start_time = TickTime::Now();
+ int64_t capture_start_time_nanos = rtc::TimeNanos();
queue_.MoveToNextFrame();
@@ -168,7 +168,8 @@ void ScreenCapturerWinMagnifier::Capture(const DesktopRegion& region) {
frame->mutable_updated_region()->Clear();
helper_.TakeInvalidRegion(frame->mutable_updated_region());
frame->set_capture_time_ms(
- (TickTime::Now() - capture_start_time).Milliseconds());
+ (rtc::TimeNanos() - capture_start_time_nanos) /
+ rtc::kNumNanosecsPerMillisec);
callback_->OnCaptureCompleted(frame);
}
« no previous file with comments | « webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc ('k') | webrtc/modules/desktop_capture/window_capturer_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698