| 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_PICTURE_LAYER_TILING_H_ | 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 virtual bool RequiresHighResToDraw() const = 0; | 51 virtual bool RequiresHighResToDraw() const = 0; |
| 52 | 52 |
| 53 protected: | 53 protected: |
| 54 virtual ~PictureLayerTilingClient() {} | 54 virtual ~PictureLayerTilingClient() {} |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 class CC_EXPORT PictureLayerTiling { | 57 class CC_EXPORT PictureLayerTiling { |
| 58 public: | 58 public: |
| 59 static const int kBorderTexels = 1; | 59 static const int kBorderTexels = 1; |
| 60 | 60 |
| 61 // TODO(vmpstr): Move this to a separate file. |
| 62 // TODO(vmpstr): Take a bool indicating that we only need required tiles. |
| 61 class CC_EXPORT TilingRasterTileIterator { | 63 class CC_EXPORT TilingRasterTileIterator { |
| 62 public: | 64 public: |
| 63 TilingRasterTileIterator(); | 65 TilingRasterTileIterator(); |
| 64 explicit TilingRasterTileIterator(PictureLayerTiling* tiling); | 66 explicit TilingRasterTileIterator(PictureLayerTiling* tiling); |
| 65 ~TilingRasterTileIterator(); | 67 ~TilingRasterTileIterator(); |
| 66 | 68 |
| 67 operator bool() const { return !!current_tile_; } | 69 operator bool() const { return !!current_tile_; } |
| 68 const Tile* operator*() const { return current_tile_; } | 70 const Tile* operator*() const { return current_tile_; } |
| 69 Tile* operator*() { return current_tile_; } | 71 Tile* operator*() { return current_tile_; } |
| 70 TilePriority::PriorityBin get_type() const { | 72 TilePriority::PriorityBin get_type() const { |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 345 |
| 344 private: | 346 private: |
| 345 DISALLOW_ASSIGN(PictureLayerTiling); | 347 DISALLOW_ASSIGN(PictureLayerTiling); |
| 346 | 348 |
| 347 RectExpansionCache expansion_cache_; | 349 RectExpansionCache expansion_cache_; |
| 348 }; | 350 }; |
| 349 | 351 |
| 350 } // namespace cc | 352 } // namespace cc |
| 351 | 353 |
| 352 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 354 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |