Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: cc/layer_tiling_data.h

Issue 11415089: ui/compositor: use cc/ directly instead of webkit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layer.h ('k') | cc/proxy.h » ('j') | cc/proxy.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CC_LAYER_TILING_DATA_H_ 6 #ifndef CC_LAYER_TILING_DATA_H_
7 #define CC_LAYER_TILING_DATA_H_ 7 #define CC_LAYER_TILING_DATA_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"
(...skipping 18 matching lines...) Expand all
29 int numTilesX() const { return m_tilingData.num_tiles_x(); } 29 int numTilesX() const { return m_tilingData.num_tiles_x(); }
30 int numTilesY() const { return m_tilingData.num_tiles_y(); } 30 int numTilesY() const { return m_tilingData.num_tiles_y(); }
31 gfx::Rect tileBounds(int i, int j) const { return m_tilingData.TileBounds(i, j); } 31 gfx::Rect tileBounds(int i, int j) const { return m_tilingData.TileBounds(i, j); }
32 gfx::Vector2d textureOffset(int xIndex, int yIndex) const { return m_tilingD ata.TextureOffset(xIndex, yIndex); } 32 gfx::Vector2d textureOffset(int xIndex, int yIndex) const { return m_tilingD ata.TextureOffset(xIndex, yIndex); }
33 33
34 // Change the tile size. This may invalidate all the existing tiles. 34 // Change the tile size. This may invalidate all the existing tiles.
35 void setTileSize(const gfx::Size&); 35 void setTileSize(const gfx::Size&);
36 gfx::Size tileSize() const; 36 gfx::Size tileSize() const;
37 // Change the border texel setting. This may invalidate all existing tiles. 37 // Change the border texel setting. This may invalidate all existing tiles.
38 void setBorderTexelOption(BorderTexelOption); 38 void setBorderTexelOption(BorderTexelOption);
39 bool hasBorderTexels() const { return m_tilingData.border_texels(); } 39 bool hasBorderTexels() const { return !!m_tilingData.border_texels(); }
40 40
41 bool isEmpty() const { return hasEmptyBounds() || !tiles().size(); } 41 bool isEmpty() const { return hasEmptyBounds() || !tiles().size(); }
42 42
43 const LayerTilingData& operator=(const LayerTilingData&); 43 const LayerTilingData& operator=(const LayerTilingData&);
44 44
45 class Tile { 45 class Tile {
46 public: 46 public:
47 Tile() : m_i(-1), m_j(-1) { } 47 Tile() : m_i(-1), m_j(-1) { }
48 virtual ~Tile() { } 48 virtual ~Tile() { }
49 49
(...skipping 30 matching lines...) Expand all
80 protected: 80 protected:
81 LayerTilingData(const gfx::Size& tileSize, BorderTexelOption); 81 LayerTilingData(const gfx::Size& tileSize, BorderTexelOption);
82 82
83 TileMap m_tiles; 83 TileMap m_tiles;
84 TilingData m_tilingData; 84 TilingData m_tilingData;
85 }; 85 };
86 86
87 } 87 }
88 88
89 #endif // CC_LAYER_TILING_DATA_H_ 89 #endif // CC_LAYER_TILING_DATA_H_
OLDNEW
« no previous file with comments | « cc/layer.h ('k') | cc/proxy.h » ('j') | cc/proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698