| 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/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/playback/display_list_raster_source.h" | 9 #include "cc/playback/display_list_raster_source.h" |
| 10 #include "cc/tiles/tile.h" | 10 #include "cc/tiles/tile.h" |
| 11 #include "cc/tiles/tile_priority.h" | 11 #include "cc/tiles/tile_priority.h" |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 class DisplayListRasterSource; | 14 class DisplayListRasterSource; |
| 15 class PictureLayerTiling; | 15 class PictureLayerTiling; |
| 16 | 16 |
| 17 class CC_EXPORT PrioritizedTile { | 17 class CC_EXPORT PrioritizedTile { |
| 18 public: | 18 public: |
| 19 // This class is constructed and returned by a |PictureLayerTiling|, and | 19 // This class is constructed and returned by a |PictureLayerTiling|, and |
| 20 // represents a tile and its priority. | 20 // represents a tile and its priority. |
| 21 PrioritizedTile(); | 21 PrioritizedTile(); |
| 22 PrioritizedTile(const PrioritizedTile& other); |
| 22 ~PrioritizedTile(); | 23 ~PrioritizedTile(); |
| 23 | 24 |
| 24 Tile* tile() const { return tile_; } | 25 Tile* tile() const { return tile_; } |
| 25 const scoped_refptr<DisplayListRasterSource>& raster_source() const { | 26 const scoped_refptr<DisplayListRasterSource>& raster_source() const { |
| 26 return raster_source_; | 27 return raster_source_; |
| 27 } | 28 } |
| 28 const TilePriority& priority() const { return priority_; } | 29 const TilePriority& priority() const { return priority_; } |
| 29 bool is_occluded() const { return is_occluded_; } | 30 bool is_occluded() const { return is_occluded_; } |
| 30 | 31 |
| 31 void AsValueInto(base::trace_event::TracedValue* value) const; | 32 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 32 | 33 |
| 33 private: | 34 private: |
| 34 friend class PictureLayerTiling; | 35 friend class PictureLayerTiling; |
| 35 | 36 |
| 36 PrioritizedTile(Tile* tile, | 37 PrioritizedTile(Tile* tile, |
| 37 scoped_refptr<DisplayListRasterSource> raster_source, | 38 scoped_refptr<DisplayListRasterSource> raster_source, |
| 38 const TilePriority priority, | 39 const TilePriority priority, |
| 39 bool is_occluded); | 40 bool is_occluded); |
| 40 | 41 |
| 41 Tile* tile_; | 42 Tile* tile_; |
| 42 scoped_refptr<DisplayListRasterSource> raster_source_; | 43 scoped_refptr<DisplayListRasterSource> raster_source_; |
| 43 TilePriority priority_; | 44 TilePriority priority_; |
| 44 bool is_occluded_; | 45 bool is_occluded_; |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 } // namespace cc | 48 } // namespace cc |
| 48 | 49 |
| 49 #endif // CC_TILES_PRIORITIZED_TILE_H_ | 50 #endif // CC_TILES_PRIORITIZED_TILE_H_ |
| OLD | NEW |