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

Unified Diff: content/gpu/gpu_watchdog_thread.cc

Issue 1133703002: Reduce GPU watchdog polling frequency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cpu
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_watchdog_thread.cc
diff --git a/content/gpu/gpu_watchdog_thread.cc b/content/gpu/gpu_watchdog_thread.cc
index 6a6f45924a015846847131306e9ddda9ddff6eb3..6052d41647dd380f4ebd4d19cff67129a1b6de55 100644
--- a/content/gpu/gpu_watchdog_thread.cc
+++ b/content/gpu/gpu_watchdog_thread.cc
@@ -21,7 +21,6 @@
namespace content {
namespace {
-const int64 kCheckPeriodMs = 2000;
#if defined(OS_CHROMEOS)
const base::FilePath::CharType
kTtyFilePath[] = FILE_PATH_LITERAL("/sys/class/tty/tty0/active");
@@ -113,7 +112,6 @@ void GpuWatchdogThread::GpuWatchdogTaskObserver::WillProcessTask(
void GpuWatchdogThread::GpuWatchdogTaskObserver::DidProcessTask(
const base::PendingTask& pending_task) {
- watchdog_->CheckArmed();
}
GpuWatchdogThread::~GpuWatchdogThread() {
@@ -168,7 +166,7 @@ void GpuWatchdogThread::OnAcknowledge() {
FROM_HERE,
base::Bind(&GpuWatchdogThread::OnCheck, weak_factory_.GetWeakPtr(),
was_suspended),
- base::TimeDelta::FromMilliseconds(kCheckPeriodMs));
+ 0.5 * timeout_);
}
void GpuWatchdogThread::OnCheck(bool after_suspend) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698