| 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" |
| 11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
| 12 | 12 |
| 13 namespace base { |
| 14 namespace debug { |
| 15 class TracedValue; |
| 16 } |
| 17 } |
| 18 |
| 13 namespace cc { | 19 namespace cc { |
| 14 | 20 |
| 15 class CC_EXPORT PictureLayerTilingSet { | 21 class CC_EXPORT PictureLayerTilingSet { |
| 16 public: | 22 public: |
| 17 enum TilingRangeType { | 23 enum TilingRangeType { |
| 18 HIGHER_THAN_HIGH_RES, | 24 HIGHER_THAN_HIGH_RES, |
| 19 HIGH_RES, | 25 HIGH_RES, |
| 20 BETWEEN_HIGH_AND_LOW_RES, | 26 BETWEEN_HIGH_AND_LOW_RES, |
| 21 LOW_RES, | 27 LOW_RES, |
| 22 LOWER_THAN_LOW_RES | 28 LOWER_THAN_LOW_RES |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 float ideal_contents_scale_; | 114 float ideal_contents_scale_; |
| 109 PictureLayerTiling::CoverageIterator tiling_iter_; | 115 PictureLayerTiling::CoverageIterator tiling_iter_; |
| 110 int current_tiling_; | 116 int current_tiling_; |
| 111 int ideal_tiling_; | 117 int ideal_tiling_; |
| 112 | 118 |
| 113 Region current_region_; | 119 Region current_region_; |
| 114 Region missing_region_; | 120 Region missing_region_; |
| 115 Region::Iterator region_iter_; | 121 Region::Iterator region_iter_; |
| 116 }; | 122 }; |
| 117 | 123 |
| 118 scoped_ptr<base::Value> AsValue() const; | 124 void AsValueInto(base::debug::TracedValue* array) const; |
| 119 size_t GPUMemoryUsageInBytes() const; | 125 size_t GPUMemoryUsageInBytes() const; |
| 120 | 126 |
| 121 TilingRange GetTilingRange(TilingRangeType type) const; | 127 TilingRange GetTilingRange(TilingRangeType type) const; |
| 122 | 128 |
| 123 private: | 129 private: |
| 124 PictureLayerTilingClient* client_; | 130 PictureLayerTilingClient* client_; |
| 125 gfx::Size layer_bounds_; | 131 gfx::Size layer_bounds_; |
| 126 ScopedPtrVector<PictureLayerTiling> tilings_; | 132 ScopedPtrVector<PictureLayerTiling> tilings_; |
| 127 | 133 |
| 128 friend class Iterator; | 134 friend class Iterator; |
| 129 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); | 135 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); |
| 130 }; | 136 }; |
| 131 | 137 |
| 132 } // namespace cc | 138 } // namespace cc |
| 133 | 139 |
| 134 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ | 140 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
| OLD | NEW |