OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 | 5 |
6 #ifndef CCLayerTilingData_h | 6 #ifndef CCLayerTilingData_h |
7 #define CCLayerTilingData_h | 7 #define CCLayerTilingData_h |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "cc/cc_export.h" |
11 #include "cc/hash_pair.h" | 12 #include "cc/hash_pair.h" |
12 #include "cc/scoped_ptr_hash_map.h" | 13 #include "cc/scoped_ptr_hash_map.h" |
13 #include "cc/tiling_data.h" | 14 #include "cc/tiling_data.h" |
14 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
15 #include "Region.h" | 16 #include "Region.h" |
16 | 17 |
17 namespace cc { | 18 namespace cc { |
18 | 19 |
19 class LayerTilingData { | 20 class CC_EXPORT LayerTilingData { |
20 public: | 21 public: |
21 enum BorderTexelOption { HasBorderTexels, NoBorderTexels }; | 22 enum BorderTexelOption { HasBorderTexels, NoBorderTexels }; |
22 | 23 |
23 ~LayerTilingData(); | 24 ~LayerTilingData(); |
24 | 25 |
25 static scoped_ptr<LayerTilingData> create(const gfx::Size& tileSize, BorderT
exelOption); | 26 static scoped_ptr<LayerTilingData> create(const gfx::Size& tileSize, BorderT
exelOption); |
26 | 27 |
27 bool hasEmptyBounds() const { return m_tilingData.has_empty_bounds(); } | 28 bool hasEmptyBounds() const { return m_tilingData.has_empty_bounds(); } |
28 int numTilesX() const { return m_tilingData.num_tiles_x(); } | 29 int numTilesX() const { return m_tilingData.num_tiles_x(); } |
29 int numTilesY() const { return m_tilingData.num_tiles_y(); } | 30 int numTilesY() const { return m_tilingData.num_tiles_y(); } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 protected: | 80 protected: |
80 LayerTilingData(const gfx::Size& tileSize, BorderTexelOption); | 81 LayerTilingData(const gfx::Size& tileSize, BorderTexelOption); |
81 | 82 |
82 TileMap m_tiles; | 83 TileMap m_tiles; |
83 TilingData m_tilingData; | 84 TilingData m_tilingData; |
84 }; | 85 }; |
85 | 86 |
86 } | 87 } |
87 | 88 |
88 #endif | 89 #endif |
OLD | NEW |