[M108 Migration][VD] Avoid pending frame counter becoming negative
[platform/framework/web/chromium-efl.git] / cc / tiles / raster_tile_priority_queue.h
1 // Copyright 2014 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_
6 #define CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_
7
8 #include <vector>
9
10 #include "cc/cc_export.h"
11 #include "cc/layers/picture_layer_impl.h"
12 #include "cc/tiles/tile_priority.h"
13
14 namespace cc {
15 class PrioritizedTile;
16
17 class CC_EXPORT RasterTilePriorityQueue {
18  public:
19   enum class Type { ALL, REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW };
20
21   static std::unique_ptr<RasterTilePriorityQueue> Create(
22       const std::vector<PictureLayerImpl*>& active_layers,
23       const std::vector<PictureLayerImpl*>& pending_layers,
24       TreePriority tree_priority,
25       Type type);
26
27   virtual ~RasterTilePriorityQueue() {}
28   RasterTilePriorityQueue(const RasterTilePriorityQueue&) = delete;
29
30   RasterTilePriorityQueue& operator=(const RasterTilePriorityQueue&) = delete;
31
32   virtual bool IsEmpty() const = 0;
33   virtual const PrioritizedTile& Top() const = 0;
34   virtual void Pop() = 0;
35
36  protected:
37   RasterTilePriorityQueue() {}
38 };
39
40 }  // namespace cc
41
42 #endif  // CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_