[M108 Migration][VD] Avoid pending frame counter becoming negative
[platform/framework/web/chromium-efl.git] / cc / tiles / prioritized_tile.h
1 // Copyright 2015 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_PRIORITIZED_TILE_H_
6 #define CC_TILES_PRIORITIZED_TILE_H_
7
8 #include "cc/cc_export.h"
9 #include "cc/paint/paint_worklet_input.h"
10 #include "cc/raster/raster_source.h"
11 #include "cc/tiles/picture_layer_tiling.h"
12 #include "cc/tiles/tile.h"
13 #include "cc/tiles/tile_priority.h"
14
15 namespace cc {
16 class RasterSource;
17 class PictureLayerTiling;
18
19 class CC_EXPORT PrioritizedTile {
20  public:
21   // This class is constructed and returned by a |PictureLayerTiling|, and
22   // represents a tile and its priority.
23   PrioritizedTile();
24   PrioritizedTile(Tile* tile,
25                   const PictureLayerTiling* source_tiling,
26                   const TilePriority& priority,
27                   bool is_occluded,
28                   bool is_process_for_images_only,
29                   bool should_decode_checkered_images_for_tile);
30   ~PrioritizedTile();
31
32   Tile* tile() const { return tile_; }
33   const scoped_refptr<RasterSource>& raster_source() const {
34     return source_tiling_->raster_source();
35   }
36   const PaintWorkletRecordMap& GetPaintWorkletRecords() const {
37     return source_tiling_->GetPaintWorkletRecords();
38   }
39   const TilePriority& priority() const { return priority_; }
40   bool is_occluded() const { return is_occluded_; }
41   bool is_process_for_images_only() const {
42     return is_process_for_images_only_;
43   }
44   bool should_decode_checkered_images_for_tile() const {
45     return should_decode_checkered_images_for_tile_;
46   }
47
48   void AsValueInto(base::trace_event::TracedValue* value) const;
49
50   const PictureLayerTiling* source_tiling() const { return source_tiling_; }
51
52  private:
53   Tile* tile_ = nullptr;
54   const PictureLayerTiling* source_tiling_ = nullptr;
55   TilePriority priority_;
56   bool is_occluded_ = false;
57   bool is_process_for_images_only_ = false;
58   bool should_decode_checkered_images_for_tile_ = false;
59 };
60
61 }  // namespace cc
62
63 #endif  // CC_TILES_PRIORITIZED_TILE_H_