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

Unified Diff: cc/resources/tile_priority_queue.h

Issue 367833003: cc: Start using raster/eviction iterators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 years, 5 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: cc/resources/tile_priority_queue.h
diff --git a/cc/resources/tile_priority_queue.h b/cc/resources/tile_priority_queue.h
new file mode 100644
index 0000000000000000000000000000000000000000..f7d1f5f9caa2831785cfeb84ad11ae184f042aad
--- /dev/null
+++ b/cc/resources/tile_priority_queue.h
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_RESOURCES_TILE_PRIORITY_QUEUE_H_
+#define CC_RESOURCES_TILE_PRIORITY_QUEUE_H_
+
+#include <vector>
+
+namespace cc {
+
+class PictureLayerImpl;
+class Tile;
+
+class TilePriorityQueue {
+ public:
+ virtual void Pop() = 0;
+ virtual bool IsEmpty() = 0;
+ virtual Tile* Top() = 0;
+
+ protected:
+ struct PairedPictureLayer {
+ PairedPictureLayer();
+ ~PairedPictureLayer();
+
+ PictureLayerImpl* active_layer;
+ PictureLayerImpl* pending_layer;
+ };
+
+ virtual ~TilePriorityQueue();
+
+ // Given a set of layers and an empty paired_layers output vector, this will
+ // construct pairs out of layers so that twin layers will appear in the same
+ // picture pair.
+ void GetPairedPictureLayers(
+ const std::vector<PictureLayerImpl*>& layers,
+ std::vector<PairedPictureLayer>* paired_layers) const;
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_TILE_PRIORITY_QUEUE_H_

Powered by Google App Engine
This is Rietveld 408576698