| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_RESOURCES_TILE_H_ | 5 #ifndef CC_RESOURCES_TILE_H_ |
| 6 #define CC_RESOURCES_TILE_H_ | 6 #define CC_RESOURCES_TILE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/resources/raster_source.h" | |
| 10 #include "cc/resources/tile_draw_info.h" | 9 #include "cc/resources/tile_draw_info.h" |
| 11 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
| 12 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
| 13 | 12 |
| 14 namespace cc { | 13 namespace cc { |
| 15 | 14 |
| 16 class PrioritizedTile; | 15 class PrioritizedTile; |
| 17 class TileManager; | 16 class TileManager; |
| 18 struct TilePriority; | 17 struct TilePriority; |
| 19 | 18 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 int tiling_i_index() const { return tiling_i_index_; } | 77 int tiling_i_index() const { return tiling_i_index_; } |
| 79 int tiling_j_index() const { return tiling_j_index_; } | 78 int tiling_j_index() const { return tiling_j_index_; } |
| 80 | 79 |
| 81 private: | 80 private: |
| 82 friend class TileManager; | 81 friend class TileManager; |
| 83 friend class FakeTileManager; | 82 friend class FakeTileManager; |
| 84 friend class FakePictureLayerImpl; | 83 friend class FakePictureLayerImpl; |
| 85 | 84 |
| 86 // Methods called by by tile manager. | 85 // Methods called by by tile manager. |
| 87 Tile(TileManager* tile_manager, | 86 Tile(TileManager* tile_manager, |
| 88 RasterSource* raster_source, | |
| 89 const gfx::Size& desired_texture_size, | 87 const gfx::Size& desired_texture_size, |
| 90 const gfx::Rect& content_rect, | 88 const gfx::Rect& content_rect, |
| 91 float contents_scale, | 89 float contents_scale, |
| 92 int layer_id, | 90 int layer_id, |
| 93 int source_frame_number, | 91 int source_frame_number, |
| 94 int flags); | 92 int flags); |
| 95 ~Tile(); | 93 ~Tile(); |
| 96 | 94 |
| 97 bool HasRasterTask() const { return !!raster_task_.get(); } | 95 bool HasRasterTask() const { return !!raster_task_.get(); } |
| 98 | 96 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 119 scoped_refptr<RasterTask> raster_task_; | 117 scoped_refptr<RasterTask> raster_task_; |
| 120 | 118 |
| 121 DISALLOW_COPY_AND_ASSIGN(Tile); | 119 DISALLOW_COPY_AND_ASSIGN(Tile); |
| 122 }; | 120 }; |
| 123 | 121 |
| 124 using ScopedTilePtr = scoped_ptr<Tile, Tile::Deleter>; | 122 using ScopedTilePtr = scoped_ptr<Tile, Tile::Deleter>; |
| 125 | 123 |
| 126 } // namespace cc | 124 } // namespace cc |
| 127 | 125 |
| 128 #endif // CC_RESOURCES_TILE_H_ | 126 #endif // CC_RESOURCES_TILE_H_ |
| OLD | NEW |