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

Unified Diff: cc/base/scoped_ptr_vector.h

Issue 431433005: cc: Use pointers for heaps in tile manager raster tile priority queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ScopedPtrVector Created 6 years, 4 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 | cc/resources/raster_tile_priority_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/scoped_ptr_vector.h
diff --git a/cc/base/scoped_ptr_vector.h b/cc/base/scoped_ptr_vector.h
index d220aafa84f20afb002f77e29e8d510bd95889e1..e046648b6916bb72025fbefbd080dc6bf8bf11a2 100644
--- a/cc/base/scoped_ptr_vector.h
+++ b/cc/base/scoped_ptr_vector.h
@@ -166,6 +166,21 @@ class ScopedPtrVector {
std::sort(data_.begin(), data_.end(), comp);
}
+ template <class Compare>
+ inline void make_heap(Compare comp) {
+ std::make_heap(data_.begin(), data_.end(), comp);
+ }
+
+ template <class Compare>
+ inline void push_heap(Compare comp) {
+ std::push_heap(data_.begin(), data_.end(), comp);
+ }
+
+ template <class Compare>
+ inline void pop_heap(Compare comp) {
+ std::pop_heap(data_.begin(), data_.end(), comp);
+ }
+
iterator begin() { return static_cast<iterator>(data_.begin()); }
const_iterator begin() const { return data_.begin(); }
iterator end() { return static_cast<iterator>(data_.end()); }
« no previous file with comments | « no previous file | cc/resources/raster_tile_priority_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698