| 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_SET_H_ | 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
| 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ | 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
| 7 | 7 |
| 8 #include "cc/base/region.h" | 8 #include "cc/base/region.h" |
| 9 #include "cc/base/scoped_ptr_vector.h" | 9 #include "cc/base/scoped_ptr_vector.h" |
| 10 #include "cc/resources/picture_layer_tiling.h" | 10 #include "cc/resources/picture_layer_tiling.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 enum TilingRangeType { | 23 enum TilingRangeType { |
| 24 HIGHER_THAN_HIGH_RES, | 24 HIGHER_THAN_HIGH_RES, |
| 25 HIGH_RES, | 25 HIGH_RES, |
| 26 BETWEEN_HIGH_AND_LOW_RES, | 26 BETWEEN_HIGH_AND_LOW_RES, |
| 27 LOW_RES, | 27 LOW_RES, |
| 28 LOWER_THAN_LOW_RES | 28 LOWER_THAN_LOW_RES |
| 29 }; | 29 }; |
| 30 struct TilingRange { | 30 struct TilingRange { |
| 31 TilingRange(size_t start, size_t end) : start(start), end(end) {} | 31 TilingRange(size_t start, size_t end) : start(start), end(end) {} |
| 32 | 32 |
| 33 bool IsIndexWithinRange(size_t index) const { |
| 34 return index >= start && index < end; |
| 35 } |
| 36 |
| 33 size_t start; | 37 size_t start; |
| 34 size_t end; | 38 size_t end; |
| 35 }; | 39 }; |
| 36 | 40 |
| 37 PictureLayerTilingSet(PictureLayerTilingClient* client, | 41 PictureLayerTilingSet(PictureLayerTilingClient* client, |
| 38 const gfx::Size& layer_bounds); | 42 const gfx::Size& layer_bounds); |
| 39 ~PictureLayerTilingSet(); | 43 ~PictureLayerTilingSet(); |
| 40 | 44 |
| 41 void SetClient(PictureLayerTilingClient* client); | 45 void SetClient(PictureLayerTilingClient* client); |
| 42 const PictureLayerTilingClient* client() const { return client_; } | 46 const PictureLayerTilingClient* client() const { return client_; } |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 gfx::Size layer_bounds_; | 135 gfx::Size layer_bounds_; |
| 132 ScopedPtrVector<PictureLayerTiling> tilings_; | 136 ScopedPtrVector<PictureLayerTiling> tilings_; |
| 133 | 137 |
| 134 friend class Iterator; | 138 friend class Iterator; |
| 135 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); | 139 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); |
| 136 }; | 140 }; |
| 137 | 141 |
| 138 } // namespace cc | 142 } // namespace cc |
| 139 | 143 |
| 140 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ | 144 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
| OLD | NEW |