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/logging.h" | 10 #include "base/logging.h" |
11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 class Vector2d; | 16 class Vector2d; |
17 } | 17 } |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 | 20 |
21 class CC_EXPORT TilingData { | 21 class CC_EXPORT TilingData { |
22 public: | 22 public: |
23 TilingData(); | 23 TilingData(); |
24 TilingData(const gfx::Size& max_texture_size, | 24 TilingData(const gfx::Size& max_texture_size, |
25 const gfx::Size& tiling_size, | 25 const gfx::Size& tiling_size, |
26 bool has_border_texels); | 26 bool has_border_texels); |
27 TilingData(const gfx::Size& max_texture_size, | 27 TilingData(const gfx::Size& max_texture_size, |
28 const gfx::Size& tiling_size, | 28 const gfx::Size& tiling_size, |
29 int border_texels); | 29 int border_texels); |
| 30 TilingData(const TilingData& other); |
| 31 ~TilingData(); |
30 | 32 |
31 gfx::Size tiling_size() const { return tiling_size_; } | 33 gfx::Size tiling_size() const { return tiling_size_; } |
32 void SetTilingSize(const gfx::Size& tiling_size); | 34 void SetTilingSize(const gfx::Size& tiling_size); |
33 | 35 |
34 gfx::Size max_texture_size() const { return max_texture_size_; } | 36 gfx::Size max_texture_size() const { return max_texture_size_; } |
35 void SetMaxTextureSize(const gfx::Size& max_texture_size); | 37 void SetMaxTextureSize(const gfx::Size& max_texture_size); |
36 | 38 |
37 int border_texels() const { return border_texels_; } | 39 int border_texels() const { return border_texels_; } |
38 void SetHasBorderTexels(bool has_border_texels); | 40 void SetHasBorderTexels(bool has_border_texels); |
39 void SetBorderTexels(int border_texels); | 41 void SetBorderTexels(int border_texels); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 DCHECK_LT(i, num_tiles_x_); | 229 DCHECK_LT(i, num_tiles_x_); |
228 DCHECK_GE(j, 0); | 230 DCHECK_GE(j, 0); |
229 DCHECK_LT(j, num_tiles_y_); | 231 DCHECK_LT(j, num_tiles_y_); |
230 } | 232 } |
231 | 233 |
232 void RecomputeNumTiles(); | 234 void RecomputeNumTiles(); |
233 | 235 |
234 gfx::Size max_texture_size_; | 236 gfx::Size max_texture_size_; |
235 gfx::Size tiling_size_; | 237 gfx::Size tiling_size_; |
236 int border_texels_; | 238 int border_texels_; |
| 239 gfx::Size borderless_max_texture_size_; |
237 | 240 |
238 // These are computed values. | 241 // These are computed values. |
239 int num_tiles_x_; | 242 int num_tiles_x_; |
240 int num_tiles_y_; | 243 int num_tiles_y_; |
241 }; | 244 }; |
242 | 245 |
243 } // namespace cc | 246 } // namespace cc |
244 | 247 |
245 #endif // CC_BASE_TILING_DATA_H_ | 248 #endif // CC_BASE_TILING_DATA_H_ |
OLD | NEW |