Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_PICTURE_LAYER_TILING_H_ | 5 #ifndef CC_PICTURE_LAYER_TILING_H_ |
| 6 #define CC_PICTURE_LAYER_TILING_H_ | 6 #define CC_PICTURE_LAYER_TILING_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "cc/cc_export.h" | 11 #include "cc/cc_export.h" |
| 12 #include "cc/hash_pair.h" | 12 #include "cc/hash_pair.h" |
| 13 #include "cc/region.h" | 13 #include "cc/region.h" |
| 14 #include "cc/tile.h" | 14 #include "cc/tile.h" |
| 15 #include "cc/tile_priority.h" | 15 #include "cc/tile_priority.h" |
| 16 #include "cc/tiling_data.h" | 16 #include "cc/tiling_data.h" |
| 17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 18 | 18 |
| 19 namespace cc { | 19 namespace cc { |
| 20 | 20 |
| 21 class PictureLayerTiling; | 21 class PictureLayerTiling; |
| 22 | 22 |
| 23 class PictureLayerTilingClient { | 23 class PictureLayerTilingClient { |
| 24 public: | 24 public: |
| 25 // Create a tile at the given content_rect (in the contents scale of the | 25 virtual ~PictureLayerTilingClient() { } |
| 26 // tiling) This might return null if the client cannot create such a tile. | 26 |
| 27 virtual scoped_refptr<Tile> CreateTile( | 27 // Create a tile at the given content_rect (in the contents scale of the |
| 28 PictureLayerTiling* tiling, | 28 // tiling) This might return null if the client cannot create such a tile. |
| 29 gfx::Rect content_rect) = 0; | 29 virtual scoped_refptr<Tile> CreateTile( |
| 30 virtual void UpdatePile(Tile* tile) = 0; | 30 PictureLayerTiling* tiling, |
|
jar (doing other things)
2013/02/01 03:41:07
You probably want to leave funky format alone (and
Paweł Hajdan Jr.
2013/02/01 10:12:43
Done. The formatting of this class is not even con
| |
| 31 gfx::Rect content_rect) = 0; | |
| 32 virtual void UpdatePile(Tile* tile) = 0; | |
| 31 }; | 33 }; |
| 32 | 34 |
| 33 class CC_EXPORT PictureLayerTiling { | 35 class CC_EXPORT PictureLayerTiling { |
| 34 public: | 36 public: |
| 35 ~PictureLayerTiling(); | 37 ~PictureLayerTiling(); |
| 36 | 38 |
| 37 // Create a tiling with no tiles. CreateTiles must be called to add some. | 39 // Create a tiling with no tiles. CreateTiles must be called to add some. |
| 38 static scoped_ptr<PictureLayerTiling> Create(float contents_scale, | 40 static scoped_ptr<PictureLayerTiling> Create(float contents_scale, |
| 39 gfx::Size tile_size); | 41 gfx::Size tile_size); |
| 40 scoped_ptr<PictureLayerTiling> Clone() const; | 42 scoped_ptr<PictureLayerTiling> Clone() const; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 TileMap tiles_; | 145 TileMap tiles_; |
| 144 TilingData tiling_data_; | 146 TilingData tiling_data_; |
| 145 TileResolution resolution_; | 147 TileResolution resolution_; |
| 146 | 148 |
| 147 friend class Iterator; | 149 friend class Iterator; |
| 148 }; | 150 }; |
| 149 | 151 |
| 150 } // namespace cc | 152 } // namespace cc |
| 151 | 153 |
| 152 #endif // CC_PICTURE_LAYER_TILING_H_ | 154 #endif // CC_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |