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

Unified Diff: third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc

Issue 2893363002: Revert of [scheduler] Move task alignment into WakeUpBudgetPool. (Closed)
Patch Set: Created 3 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: third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc b/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc
index e7d257ec7d9768a82c69c6efa47c366a4581c58f..dd0baccae90a392aa8645b2f108509f75e8368fb 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc
@@ -5,8 +5,6 @@
#include "platform/scheduler/renderer/task_queue_throttler.h"
#include <cstdint>
-
-#include <iostream> // FIXME
#include "base/logging.h"
#include "base/memory/ptr_util.h"
@@ -204,7 +202,6 @@
return;
base::TimeTicks now = tick_clock_->NowTicks();
- next_wake_up = std::max(now, next_wake_up);
auto find_it = queue_details_.find(queue);
if (find_it == queue_details_.end())
@@ -253,11 +250,8 @@
if (!allow_throttling_)
return;
- // TODO(altimin): Consider removing alignment here.
base::TimeTicks runtime =
- std::max(now, unaligned_runtime)
- .SnappedToNextTick(base::TimeTicks(),
- base::TimeDelta::FromSeconds(1));
+ AlignedThrottledRunTime(std::max(now, unaligned_runtime));
DCHECK_LE(now, runtime);
// If there is a pending call to PumpThrottledTasks and it's sooner than

Powered by Google App Engine
This is Rietveld 408576698