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/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/playback/raster_source.h" | 9 #include "cc/playback/raster_source.h" |
| 10 #include "cc/tiles/picture_layer_tiling.h" | |
| 10 #include "cc/tiles/tile.h" | 11 #include "cc/tiles/tile.h" |
| 11 #include "cc/tiles/tile_priority.h" | 12 #include "cc/tiles/tile_priority.h" |
| 12 | 13 |
| 13 namespace cc { | 14 namespace cc { |
| 14 class RasterSource; | 15 class RasterSource; |
| 15 class PictureLayerTiling; | 16 class PictureLayerTiling; |
| 16 | 17 |
| 17 class CC_EXPORT PrioritizedTile { | 18 class CC_EXPORT PrioritizedTile { |
| 18 public: | 19 public: |
| 19 // This class is constructed and returned by a |PictureLayerTiling|, and | 20 // This class is constructed and returned by a |PictureLayerTiling|, and |
| 20 // represents a tile and its priority. | 21 // represents a tile and its priority. |
| 21 PrioritizedTile(); | 22 PrioritizedTile(); |
| 22 PrioritizedTile(const PrioritizedTile& other); | |
|
danakj
2016/07/14 21:19:08
Can it be DISALLOW_COPY_AND_ASSIGN?
vmpstr
2016/07/14 21:27:41
No, it's still being copied...
| |
| 23 PrioritizedTile(PrioritizedTile&& other); | |
| 24 ~PrioritizedTile(); | 23 ~PrioritizedTile(); |
| 25 | 24 |
| 26 PrioritizedTile& operator=(const PrioritizedTile& other); | |
| 27 PrioritizedTile& operator=(PrioritizedTile&& other); | |
| 28 | |
| 29 Tile* tile() const { return tile_; } | 25 Tile* tile() const { return tile_; } |
| 30 const scoped_refptr<RasterSource>& raster_source() const { | 26 const scoped_refptr<RasterSource>& raster_source() const { |
| 31 return raster_source_; | 27 return source_tiling_->raster_source(); |
| 32 } | 28 } |
| 33 const TilePriority& priority() const { return priority_; } | 29 const TilePriority& priority() const { return priority_; } |
| 34 bool is_occluded() const { return is_occluded_; } | 30 bool is_occluded() const { return is_occluded_; } |
| 35 | 31 |
| 36 void AsValueInto(base::trace_event::TracedValue* value) const; | 32 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 37 | 33 |
| 38 private: | 34 private: |
| 39 friend class PictureLayerTiling; | 35 friend class PictureLayerTiling; |
|
danakj
2016/07/14 21:19:08
can it be gone?
vmpstr
2016/07/14 21:27:41
Done.
| |
| 40 | 36 |
| 41 PrioritizedTile(Tile* tile, | 37 PrioritizedTile(Tile* tile, |
|
danakj
2016/07/14 21:19:08
can it be public?
vmpstr
2016/07/14 21:27:40
Done.
| |
| 42 scoped_refptr<RasterSource> raster_source, | 38 const PictureLayerTiling* source_tiling, |
| 43 const TilePriority priority, | 39 const TilePriority priority, |
| 44 bool is_occluded); | 40 bool is_occluded); |
| 45 | 41 |
| 46 Tile* tile_; | 42 Tile* tile_ = nullptr; |
| 47 scoped_refptr<RasterSource> raster_source_; | 43 const PictureLayerTiling* source_tiling_ = nullptr; |
| 48 TilePriority priority_; | 44 TilePriority priority_; |
| 49 bool is_occluded_; | 45 bool is_occluded_ = false; |
| 50 }; | 46 }; |
| 51 | 47 |
| 52 } // namespace cc | 48 } // namespace cc |
| 53 | 49 |
| 54 #endif // CC_TILES_PRIORITIZED_TILE_H_ | 50 #endif // CC_TILES_PRIORITIZED_TILE_H_ |
| OLD | NEW |