[M108 Migration][VD] Avoid pending frame counter becoming negative
[platform/framework/web/chromium-efl.git] / cc / tiles / prioritized_tile.cc
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 #include "cc/tiles/prioritized_tile.h"
6
7 #include "cc/tiles/picture_layer_tiling.h"
8 #include "components/viz/common/traced_value.h"
9
10 namespace cc {
11
12 PrioritizedTile::PrioritizedTile() = default;
13
14 PrioritizedTile::PrioritizedTile(Tile* tile,
15                                  const PictureLayerTiling* source_tiling,
16                                  const TilePriority& priority,
17                                  bool is_occluded,
18                                  bool is_process_for_images_only,
19                                  bool should_decode_checkered_images_for_tile)
20     : tile_(tile),
21       source_tiling_(source_tiling),
22       priority_(priority),
23       is_occluded_(is_occluded),
24       is_process_for_images_only_(is_process_for_images_only),
25       should_decode_checkered_images_for_tile_(
26           should_decode_checkered_images_for_tile) {}
27
28 PrioritizedTile::~PrioritizedTile() = default;
29
30 void PrioritizedTile::AsValueInto(base::trace_event::TracedValue* value) const {
31   tile_->AsValueInto(value);
32
33   viz::TracedValue::SetIDRef(raster_source().get(), value, "picture_pile");
34
35   value->BeginDictionary("combined_priority");
36   priority().AsValueInto(value);
37   value->SetBoolean("is_occluded", is_occluded_);
38   value->EndDictionary();
39
40   value->SetString("resolution", TileResolutionToString(priority().resolution));
41 }
42
43 }  // namespace cc