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.
5 #include "cc/tiles/prioritized_tile.h"
7 #include "cc/tiles/picture_layer_tiling.h"
8 #include "components/viz/common/traced_value.h"
12 PrioritizedTile::PrioritizedTile() = default;
14 PrioritizedTile::PrioritizedTile(Tile* tile,
15 const PictureLayerTiling* source_tiling,
16 const TilePriority& priority,
18 bool is_process_for_images_only,
19 bool should_decode_checkered_images_for_tile)
21 source_tiling_(source_tiling),
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) {}
28 PrioritizedTile::~PrioritizedTile() = default;
30 void PrioritizedTile::AsValueInto(base::trace_event::TracedValue* value) const {
31 tile_->AsValueInto(value);
33 viz::TracedValue::SetIDRef(raster_source().get(), value, "picture_pile");
35 value->BeginDictionary("combined_priority");
36 priority().AsValueInto(value);
37 value->SetBoolean("is_occluded", is_occluded_);
38 value->EndDictionary();
40 value->SetString("resolution", TileResolutionToString(priority().resolution));