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_TILING_DATA_H_ | 5 #ifndef CC_TILING_DATA_H_ |
6 #define CC_TILING_DATA_H_ | 6 #define CC_TILING_DATA_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 TilingData( | 27 TilingData( |
28 gfx::Size max_texture_size, | 28 gfx::Size max_texture_size, |
29 gfx::Size total_size, | 29 gfx::Size total_size, |
30 int border_texels); | 30 int border_texels); |
31 | 31 |
32 gfx::Size total_size() const { return total_size_; } | 32 gfx::Size total_size() const { return total_size_; } |
33 void SetTotalSize(const gfx::Size total_size); | 33 void SetTotalSize(const gfx::Size total_size); |
34 | 34 |
35 gfx::Size max_texture_size() const { return max_texture_size_; } | 35 gfx::Size max_texture_size() const { return max_texture_size_; } |
36 void SetMaxTextureSize(gfx::Size max_texture_size); | 36 void SetMaxTextureSize(gfx::Size max_texture_size); |
| 37 gfx::Size TileStride() const; |
37 | 38 |
38 int border_texels() const { return border_texels_; } | 39 int border_texels() const { return border_texels_; } |
39 void SetHasBorderTexels(bool has_border_texels); | 40 void SetHasBorderTexels(bool has_border_texels); |
40 void SetBorderTexels(int border_texels); | 41 void SetBorderTexels(int border_texels); |
41 | 42 |
42 bool has_empty_bounds() const { return !num_tiles_x_ || !num_tiles_y_; } | 43 bool has_empty_bounds() const { return !num_tiles_x_ || !num_tiles_y_; } |
43 int num_tiles_x() const { return num_tiles_x_; } | 44 int num_tiles_x() const { return num_tiles_x_; } |
44 int num_tiles_y() const { return num_tiles_y_; } | 45 int num_tiles_y() const { return num_tiles_y_; } |
45 // Return the tile index whose non-border texels include src_position. | 46 // Return the tile index whose non-border texels include src_position. |
46 int TileXIndexFromSrcCoord(int src_position) const; | 47 int TileXIndexFromSrcCoord(int src_position) const; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 int border_texels_; | 135 int border_texels_; |
135 | 136 |
136 // These are computed values. | 137 // These are computed values. |
137 int num_tiles_x_; | 138 int num_tiles_x_; |
138 int num_tiles_y_; | 139 int num_tiles_y_; |
139 }; | 140 }; |
140 | 141 |
141 } // namespace cc | 142 } // namespace cc |
142 | 143 |
143 #endif // CC_TILING_DATA_H_ | 144 #endif // CC_TILING_DATA_H_ |
OLD | NEW |