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 #if USE(ACCELERATED_COMPOSITING) | 9 #if USE(ACCELERATED_COMPOSITING) |
10 | 10 |
11 #include "IntRect.h" | 11 #include "IntRect.h" |
12 #include "Region.h" | 12 #include "Region.h" |
13 #include "TilingData.h" | 13 #include "TilingData.h" |
14 #include <wtf/HashMap.h> | 14 #include <wtf/HashMap.h> |
15 #include <wtf/HashTraits.h> | 15 #include <wtf/HashTraits.h> |
16 #include <wtf/PassOwnPtr.h> | 16 #include <wtf/PassOwnPtr.h> |
17 | 17 |
18 namespace cc { | 18 namespace cc { |
19 | 19 |
20 class CCLayerTilingData { | 20 class CCLayerTilingData { |
21 public: | 21 public: |
22 enum BorderTexelOption { HasBorderTexels, NoBorderTexels }; | 22 enum BorderTexelOption { HasBorderTexels, NoBorderTexels }; |
23 | 23 |
| 24 ~CCLayerTilingData(); |
| 25 |
24 static PassOwnPtr<CCLayerTilingData> create(const IntSize& tileSize, BorderT
exelOption); | 26 static PassOwnPtr<CCLayerTilingData> create(const IntSize& tileSize, BorderT
exelOption); |
25 | 27 |
26 bool hasEmptyBounds() const { return m_tilingData.hasEmptyBounds(); } | 28 bool hasEmptyBounds() const { return m_tilingData.hasEmptyBounds(); } |
27 int numTilesX() const { return m_tilingData.numTilesX(); } | 29 int numTilesX() const { return m_tilingData.numTilesX(); } |
28 int numTilesY() const { return m_tilingData.numTilesY(); } | 30 int numTilesY() const { return m_tilingData.numTilesY(); } |
29 IntRect tileBounds(int i, int j) const { return m_tilingData.tileBounds(i, j
); } | 31 IntRect tileBounds(int i, int j) const { return m_tilingData.tileBounds(i, j
); } |
30 IntPoint textureOffset(int xIndex, int yIndex) const { return m_tilingData.t
extureOffset(xIndex, yIndex); } | 32 IntPoint textureOffset(int xIndex, int yIndex) const { return m_tilingData.t
extureOffset(xIndex, yIndex); } |
31 | 33 |
32 // Change the tile size. This may invalidate all the existing tiles. | 34 // Change the tile size. This may invalidate all the existing tiles. |
33 void setTileSize(const IntSize&); | 35 void setTileSize(const IntSize&); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 91 |
90 TileMap m_tiles; | 92 TileMap m_tiles; |
91 TilingData m_tilingData; | 93 TilingData m_tilingData; |
92 }; | 94 }; |
93 | 95 |
94 } | 96 } |
95 | 97 |
96 #endif // USE(ACCELERATED_COMPOSITING) | 98 #endif // USE(ACCELERATED_COMPOSITING) |
97 | 99 |
98 #endif | 100 #endif |
OLD | NEW |