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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/work_queue_sets.h

Issue 2421283002: Revert of Optimize blink scheduler with an intrusive heap (Closed)
Patch Set: Created 4 years, 2 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/base/work_queue_sets.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/work_queue_sets.h b/third_party/WebKit/Source/platform/scheduler/base/work_queue_sets.h
index d35319939c3d06910ff8d8ab866910c4972c147e..8fa2c5d18886969e4b76edbc5c0d488d4a414180 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/work_queue_sets.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/work_queue_sets.h
@@ -13,9 +13,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/trace_event/trace_event_argument.h"
-#include "platform/scheduler/base/intrusive_heap.h"
#include "platform/scheduler/base/task_queue_impl.h"
-#include "platform/scheduler/base/work_queue.h"
#include "public/platform/WebCommon.h"
namespace blink {
@@ -57,7 +55,7 @@
bool IsSetEmpty(size_t set_index) const;
#if DCHECK_IS_ON() || !defined(NDEBUG)
- // Note this iterates over everything in |work_queue_heaps_|.
+ // Note this iterates over everything in |enqueue_order_to_work_queue_maps_|.
// It's intended for use with DCHECKS and for testing
bool ContainsWorkQueueForTest(const WorkQueue* queue) const;
#endif
@@ -65,20 +63,8 @@
const char* name() const { return name_; }
private:
- struct OldestTaskEnqueueOrder {
- EnqueueOrder key;
- WorkQueue* value;
-
- bool operator<=(const OldestTaskEnqueueOrder& other) const {
- return key <= other.key;
- }
-
- void SetHeapHandle(HeapHandle handle) { value->set_heap_handle(handle); }
- };
-
- // For each set |work_queue_heaps_| has a queue of WorkQueue ordered by the
- // oldest task in each WorkQueue.
- std::vector<IntrusiveHeap<OldestTaskEnqueueOrder>> work_queue_heaps_;
+ typedef std::map<EnqueueOrder, WorkQueue*> EnqueueOrderToWorkQueueMap;
+ std::vector<EnqueueOrderToWorkQueueMap> enqueue_order_to_work_queue_maps_;
const char* name_;
DISALLOW_COPY_AND_ASSIGN(WorkQueueSets);

Powered by Google App Engine
This is Rietveld 408576698