| 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_PICTURE_LAYER_TILING_H_ | 5 #ifndef CC_PICTURE_LAYER_TILING_H_ |
| 6 #define CC_PICTURE_LAYER_TILING_H_ | 6 #define CC_PICTURE_LAYER_TILING_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 all_tiles.push_back(it->second); | 64 all_tiles.push_back(it->second); |
| 65 return all_tiles; | 65 return all_tiles; |
| 66 } | 66 } |
| 67 | 67 |
| 68 enum LayerDeviceAlignment { | 68 enum LayerDeviceAlignment { |
| 69 LayerDeviceAlignmentUnknown, | 69 LayerDeviceAlignmentUnknown, |
| 70 LayerAlignedToDevice, | 70 LayerAlignedToDevice, |
| 71 LayerNotAlignedToDevice, | 71 LayerNotAlignedToDevice, |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 static gfx::Rect ExpandRectEquallyToAreaBoundedBy( |
| 75 gfx::Rect starting_rect, |
| 76 int64 target_area, |
| 77 gfx::Rect bounding_rect); |
| 78 |
| 74 // Iterate over all tiles to fill content_rect. Even if tiles are invalid | 79 // Iterate over all tiles to fill content_rect. Even if tiles are invalid |
| 75 // (i.e. no valid resource) this tiling should still iterate over them. | 80 // (i.e. no valid resource) this tiling should still iterate over them. |
| 76 // The union of all geometry_rect calls for each element iterated over should | 81 // The union of all geometry_rect calls for each element iterated over should |
| 77 // exactly equal content_rect and no two geometry_rects should intersect. | 82 // exactly equal content_rect and no two geometry_rects should intersect. |
| 78 class CC_EXPORT Iterator { | 83 class CC_EXPORT Iterator { |
| 79 public: | 84 public: |
| 80 Iterator(); | 85 Iterator(); |
| 81 Iterator(const PictureLayerTiling* tiling, | 86 Iterator(const PictureLayerTiling* tiling, |
| 82 float dest_scale, | 87 float dest_scale, |
| 83 gfx::Rect rect, | 88 gfx::Rect rect, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 TileResolution resolution_; | 170 TileResolution resolution_; |
| 166 int last_source_frame_number_; | 171 int last_source_frame_number_; |
| 167 double last_impl_frame_time_; | 172 double last_impl_frame_time_; |
| 168 | 173 |
| 169 friend class Iterator; | 174 friend class Iterator; |
| 170 }; | 175 }; |
| 171 | 176 |
| 172 } // namespace cc | 177 } // namespace cc |
| 173 | 178 |
| 174 #endif // CC_PICTURE_LAYER_TILING_H_ | 179 #endif // CC_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |