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

Unified Diff: webrtc/modules/desktop_capture/screen_capturer_mac.mm

Issue 1888593004: Delete all use of tick_util.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address Stefan's comments. Created 4 years, 8 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/screen_capturer_mac.mm
diff --git a/webrtc/modules/desktop_capture/screen_capturer_mac.mm b/webrtc/modules/desktop_capture/screen_capturer_mac.mm
index c41dc4d7a3b4ba59e4ebe6880f1e090dae5386b5..39bfed127f43c18e2ef7d67e43ae43883c1d6c6c 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_mac.mm
+++ b/webrtc/modules/desktop_capture/screen_capturer_mac.mm
@@ -23,6 +23,7 @@
#include <OpenGL/OpenGL.h>
#include "webrtc/base/macutils.h"
+#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_geometry.h"
@@ -33,7 +34,6 @@
#include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
#include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
#include "webrtc/system_wrappers/include/logging.h"
-#include "webrtc/system_wrappers/include/tick_util.h"
namespace webrtc {
@@ -381,7 +381,7 @@ void ScreenCapturerMac::Start(Callback* callback) {
}
void ScreenCapturerMac::Capture(const DesktopRegion& region_to_capture) {
- TickTime capture_start_time = TickTime::Now();
+ int64_t capture_start_time_nanos = rtc::TimeNanos();
queue_.MoveToNextFrame();
@@ -444,7 +444,8 @@ void ScreenCapturerMac::Capture(const DesktopRegion& region_to_capture) {
desktop_config_monitor_->Unlock();
new_frame->set_capture_time_ms(
- (TickTime::Now() - capture_start_time).Milliseconds());
+ (rtc::TimeNanos() - capture_start_time_nanos) /
+ rtc::kNumNanosecsPerMillisec);
callback_->OnCaptureCompleted(new_frame);
}

Powered by Google App Engine
This is Rietveld 408576698