Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_TILES_PRIORITIZED_TILE_H_ | 5 #ifndef CC_TILES_PRIORITIZED_TILE_H_ |
| 6 #define CC_TILES_PRIORITIZED_TILE_H_ | 6 #define CC_TILES_PRIORITIZED_TILE_H_ |
| 7 | 7 |
| 8 #include "cc/cc_export.h" | 8 #include "cc/cc_export.h" |
| 9 #include "cc/raster/raster_source.h" | 9 #include "cc/raster/raster_source.h" |
| 10 #include "cc/tiles/picture_layer_tiling.h" | 10 #include "cc/tiles/picture_layer_tiling.h" |
| 11 #include "cc/tiles/tile.h" | 11 #include "cc/tiles/tile.h" |
| 12 #include "cc/tiles/tile_priority.h" | 12 #include "cc/tiles/tile_priority.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 class RasterSource; | 15 class RasterSource; |
| 16 class PictureLayerTiling; | 16 class PictureLayerTiling; |
| 17 | 17 |
| 18 class CC_EXPORT PrioritizedTile { | 18 class CC_EXPORT PrioritizedTile { |
| 19 public: | 19 public: |
| 20 // This class is constructed and returned by a |PictureLayerTiling|, and | 20 // This class is constructed and returned by a |PictureLayerTiling|, and |
| 21 // represents a tile and its priority. | 21 // represents a tile and its priority. |
| 22 PrioritizedTile(); | 22 PrioritizedTile(); |
| 23 PrioritizedTile(Tile* tile, | 23 PrioritizedTile(Tile* tile, |
| 24 const PictureLayerTiling* source_tiling, | 24 const PictureLayerTiling* source_tiling, |
| 25 const TilePriority& priority, | 25 const TilePriority& priority, |
| 26 bool is_occluded, | 26 bool is_occluded, |
| 27 bool is_process_for_images_only); | 27 bool is_process_for_images_only, |
| 28 bool should_decode_checkered_images_for_tile); | |
| 28 ~PrioritizedTile(); | 29 ~PrioritizedTile(); |
| 29 | 30 |
| 30 Tile* tile() const { return tile_; } | 31 Tile* tile() const { return tile_; } |
| 31 const scoped_refptr<RasterSource>& raster_source() const { | 32 const scoped_refptr<RasterSource>& raster_source() const { |
| 32 return source_tiling_->raster_source(); | 33 return source_tiling_->raster_source(); |
| 33 } | 34 } |
| 34 const TilePriority& priority() const { return priority_; } | 35 const TilePriority& priority() const { return priority_; } |
| 35 bool is_occluded() const { return is_occluded_; } | 36 bool is_occluded() const { return is_occluded_; } |
| 36 bool is_process_for_images_only() const { | 37 bool is_process_for_images_only() const { |
| 37 return is_process_for_images_only_; | 38 return is_process_for_images_only_; |
| 38 } | 39 } |
| 40 bool should_decode_checkered_images_for_tile() const { | |
|
vmpstr
2017/04/18 00:20:00
This function name is a bit complicated.
| |
| 41 return should_decode_checkered_images_for_tile_; | |
| 42 } | |
| 39 | 43 |
| 40 void AsValueInto(base::trace_event::TracedValue* value) const; | 44 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 41 | 45 |
| 42 private: | 46 private: |
| 43 Tile* tile_ = nullptr; | 47 Tile* tile_ = nullptr; |
| 44 const PictureLayerTiling* source_tiling_ = nullptr; | 48 const PictureLayerTiling* source_tiling_ = nullptr; |
| 45 TilePriority priority_; | 49 TilePriority priority_; |
| 46 bool is_occluded_ = false; | 50 bool is_occluded_ = false; |
| 47 bool is_process_for_images_only_ = false; | 51 bool is_process_for_images_only_ = false; |
| 52 bool should_decode_checkered_images_for_tile_ = false; | |
| 48 }; | 53 }; |
| 49 | 54 |
| 50 } // namespace cc | 55 } // namespace cc |
| 51 | 56 |
| 52 #endif // CC_TILES_PRIORITIZED_TILE_H_ | 57 #endif // CC_TILES_PRIORITIZED_TILE_H_ |
| OLD | NEW |