blob: 7bfc22965b670133f488212513ba08cdbd2b9b86 [file] [log] [blame]
[email protected]bf050582014-07-24 11:10:581// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
danakj920156852015-05-18 20:22:295#ifndef CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_
6#define CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_
[email protected]bf050582014-07-24 11:10:587
[email protected]bf050582014-07-24 11:10:588#include <vector>
9
chrishtrac41ff92017-03-17 05:07:3010#include "cc/cc_export.h"
[email protected]bf050582014-07-24 11:10:5811#include "cc/layers/picture_layer_impl.h"
danakj920156852015-05-18 20:22:2912#include "cc/tiles/tile_priority.h"
[email protected]bf050582014-07-24 11:10:5813
14namespace cc {
hendrikw8cc26dd2015-05-12 02:12:3515class PrioritizedTile;
[email protected]bf050582014-07-24 11:10:5816
17class CC_EXPORT RasterTilePriorityQueue {
18 public:
vmpstrfe477d5a2015-01-12 22:20:4919 enum class Type { ALL, REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW };
20
danakj60bc3bc2016-04-09 00:24:4821 static std::unique_ptr<RasterTilePriorityQueue> Create(
hendrikw0ab2fae32015-05-06 00:08:4222 const std::vector<PictureLayerImpl*>& active_layers,
23 const std::vector<PictureLayerImpl*>& pending_layers,
vmpstrb4040632015-01-23 17:53:4124 TreePriority tree_priority,
25 Type type);
[email protected]bf050582014-07-24 11:10:5826
vmpstrb4040632015-01-23 17:53:4127 virtual ~RasterTilePriorityQueue() {}
Vladimir Levinf06d1cd72019-03-13 18:24:1028 RasterTilePriorityQueue(const RasterTilePriorityQueue&) = delete;
29
30 RasterTilePriorityQueue& operator=(const RasterTilePriorityQueue&) = delete;
[email protected]bf050582014-07-24 11:10:5831
vmpstrb4040632015-01-23 17:53:4132 virtual bool IsEmpty() const = 0;
hendrikw8cc26dd2015-05-12 02:12:3533 virtual const PrioritizedTile& Top() const = 0;
vmpstrb4040632015-01-23 17:53:4134 virtual void Pop() = 0;
[email protected]bf050582014-07-24 11:10:5835
vmpstrb4040632015-01-23 17:53:4136 protected:
37 RasterTilePriorityQueue() {}
[email protected]bf050582014-07-24 11:10:5838};
39
40} // namespace cc
41
danakj920156852015-05-18 20:22:2942#endif // CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_