OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_BASE_TILING_DATA_H_ | 5 #ifndef CC_BASE_TILING_DATA_H_ |
6 #define CC_BASE_TILING_DATA_H_ | 6 #define CC_BASE_TILING_DATA_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 Direction direction_; | 173 Direction direction_; |
174 int delta_x_; | 174 int delta_x_; |
175 int delta_y_; | 175 int delta_y_; |
176 int current_step_; | 176 int current_step_; |
177 int horizontal_step_count_; | 177 int horizontal_step_count_; |
178 int vertical_step_count_; | 178 int vertical_step_count_; |
179 }; | 179 }; |
180 | 180 |
181 private: | 181 private: |
182 std::pair<int, int> UnclampedFirstBorderTileIndexFromSrcCoord(int x, | |
183 int y) const; | |
184 std::pair<int, int> UnclampedLastBorderTileIndexFromSrcCoord(int x, | |
185 int y) const; | |
186 | |
187 void AssertTile(int i, int j) const { | 182 void AssertTile(int i, int j) const { |
188 DCHECK_GE(i, 0); | 183 DCHECK_GE(i, 0); |
189 DCHECK_LT(i, num_tiles_x_); | 184 DCHECK_LT(i, num_tiles_x_); |
190 DCHECK_GE(j, 0); | 185 DCHECK_GE(j, 0); |
191 DCHECK_LT(j, num_tiles_y_); | 186 DCHECK_LT(j, num_tiles_y_); |
192 } | 187 } |
193 | 188 |
194 void RecomputeNumTiles(); | 189 void RecomputeNumTiles(); |
195 | 190 |
196 gfx::Size max_texture_size_; | 191 gfx::Size max_texture_size_; |
197 gfx::Size total_size_; | 192 gfx::Size total_size_; |
198 int border_texels_; | 193 int border_texels_; |
199 | 194 |
200 // These are computed values. | 195 // These are computed values. |
201 int num_tiles_x_; | 196 int num_tiles_x_; |
202 int num_tiles_y_; | 197 int num_tiles_y_; |
203 }; | 198 }; |
204 | 199 |
205 } // namespace cc | 200 } // namespace cc |
206 | 201 |
207 #endif // CC_BASE_TILING_DATA_H_ | 202 #endif // CC_BASE_TILING_DATA_H_ |
OLD | NEW |