| 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" | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 24  public: | 24  public: | 
| 25   // Create a tile at the given content_rect (in the contents scale of the | 25   // Create a tile at the given content_rect (in the contents scale of the | 
| 26   // tiling) This might return null if the client cannot create such a tile. | 26   // tiling) This might return null if the client cannot create such a tile. | 
| 27   virtual scoped_refptr<Tile> CreateTile( | 27   virtual scoped_refptr<Tile> CreateTile( | 
| 28     PictureLayerTiling* tiling, | 28     PictureLayerTiling* tiling, | 
| 29     gfx::Rect content_rect) = 0; | 29     gfx::Rect content_rect) = 0; | 
| 30   virtual void UpdatePile(Tile* tile) = 0; | 30   virtual void UpdatePile(Tile* tile) = 0; | 
| 31   virtual gfx::Size CalculateTileSize( | 31   virtual gfx::Size CalculateTileSize( | 
| 32     gfx::Size current_tile_size, | 32     gfx::Size current_tile_size, | 
| 33     gfx::Size content_bounds) = 0; | 33     gfx::Size content_bounds) = 0; | 
| 34 |  | 
| 35  protected: |  | 
| 36   virtual ~PictureLayerTilingClient() { } |  | 
| 37 }; | 34 }; | 
| 38 | 35 | 
| 39 class CC_EXPORT PictureLayerTiling { | 36 class CC_EXPORT PictureLayerTiling { | 
| 40  public: | 37  public: | 
| 41   ~PictureLayerTiling(); | 38   ~PictureLayerTiling(); | 
| 42 | 39 | 
| 43   // Create a tiling with no tiles.  CreateTiles must be called to add some. | 40   // Create a tiling with no tiles.  CreateTiles must be called to add some. | 
| 44   static scoped_ptr<PictureLayerTiling> Create(float contents_scale); | 41   static scoped_ptr<PictureLayerTiling> Create(float contents_scale); | 
| 45   scoped_ptr<PictureLayerTiling> Clone() const; | 42   scoped_ptr<PictureLayerTiling> Clone() const; | 
| 46 | 43 | 
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 159   TileResolution resolution_; | 156   TileResolution resolution_; | 
| 160   int last_source_frame_number_; | 157   int last_source_frame_number_; | 
| 161   double last_impl_frame_time_; | 158   double last_impl_frame_time_; | 
| 162 | 159 | 
| 163   friend class Iterator; | 160   friend class Iterator; | 
| 164 }; | 161 }; | 
| 165 | 162 | 
| 166 }  // namespace cc | 163 }  // namespace cc | 
| 167 | 164 | 
| 168 #endif  // CC_PICTURE_LAYER_TILING_H_ | 165 #endif  // CC_PICTURE_LAYER_TILING_H_ | 
| OLD | NEW | 
|---|