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 <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 it != tiles_.end(); ++it) | 69 it != tiles_.end(); ++it) |
70 all_tiles.push_back(it->second); | 70 all_tiles.push_back(it->second); |
71 return all_tiles; | 71 return all_tiles; |
72 } | 72 } |
73 | 73 |
74 static gfx::Rect ExpandRectEquallyToAreaBoundedBy( | 74 static gfx::Rect ExpandRectEquallyToAreaBoundedBy( |
75 gfx::Rect starting_rect, | 75 gfx::Rect starting_rect, |
76 int64 target_area, | 76 int64 target_area, |
77 gfx::Rect bounding_rect); | 77 gfx::Rect bounding_rect); |
78 | 78 |
| 79 static gfx::Rect ExpandRectBySizeBoundedBy( |
| 80 gfx::Rect starting_rect, |
| 81 int horizontal_expansion, |
| 82 int vertical_expansion, |
| 83 gfx::Rect bounding_rect); |
| 84 |
79 // Iterate over all tiles to fill content_rect. Even if tiles are invalid | 85 // Iterate over all tiles to fill content_rect. Even if tiles are invalid |
80 // (i.e. no valid resource) this tiling should still iterate over them. | 86 // (i.e. no valid resource) this tiling should still iterate over them. |
81 // The union of all geometry_rect calls for each element iterated over should | 87 // The union of all geometry_rect calls for each element iterated over should |
82 // exactly equal content_rect and no two geometry_rects should intersect. | 88 // exactly equal content_rect and no two geometry_rects should intersect. |
83 class CC_EXPORT CoverageIterator { | 89 class CC_EXPORT CoverageIterator { |
84 public: | 90 public: |
85 CoverageIterator(); | 91 CoverageIterator(); |
86 CoverageIterator(const PictureLayerTiling* tiling, | 92 CoverageIterator(const PictureLayerTiling* tiling, |
87 float dest_scale, | 93 float dest_scale, |
88 gfx::Rect rect); | 94 gfx::Rect rect); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 176 |
171 friend class CoverageIterator; | 177 friend class CoverageIterator; |
172 | 178 |
173 private: | 179 private: |
174 DISALLOW_ASSIGN(PictureLayerTiling); | 180 DISALLOW_ASSIGN(PictureLayerTiling); |
175 }; | 181 }; |
176 | 182 |
177 } // namespace cc | 183 } // namespace cc |
178 | 184 |
179 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 185 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
OLD | NEW |