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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 int right_; | 79 int right_; |
80 int bottom_; | 80 int bottom_; |
81 | 81 |
82 friend class PictureLayerTiling; | 82 friend class PictureLayerTiling; |
83 }; | 83 }; |
84 | 84 |
85 Region OpaqueRegionInContentRect(const gfx::Rect&) const; | 85 Region OpaqueRegionInContentRect(const gfx::Rect&) const; |
86 | 86 |
87 void Reset() { return tiles_.clear(); } | 87 void Reset() { return tiles_.clear(); } |
88 | 88 |
| 89 void UpdateTilePriorities(const gfx::Size& view_port, |
| 90 float layer_content_scale, |
| 91 const gfx::Transform& last_screen_transform, |
| 92 const gfx::Transform& current_screen_transform, |
| 93 double time_delta); |
| 94 |
89 protected: | 95 protected: |
90 typedef std::pair<int, int> TileMapKey; | 96 typedef std::pair<int, int> TileMapKey; |
91 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; | 97 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; |
92 | 98 |
93 PictureLayerTiling(float contents_scale, gfx::Size tileSize); | 99 PictureLayerTiling(float contents_scale, gfx::Size tileSize); |
94 Tile* TileAt(int, int) const; | 100 Tile* TileAt(int, int) const; |
95 void CreateTile(int i, int j); | 101 void CreateTile(int i, int j); |
96 | 102 |
97 PictureLayerTilingClient* client_; | 103 PictureLayerTilingClient* client_; |
98 float contents_scale_; | 104 float contents_scale_; |
99 gfx::Size layer_bounds_; | 105 gfx::Size layer_bounds_; |
100 TileMap tiles_; | 106 TileMap tiles_; |
101 TilingData tiling_data_; | 107 TilingData tiling_data_; |
102 | 108 |
103 friend class Iterator; | 109 friend class Iterator; |
104 }; | 110 }; |
105 | 111 |
106 } // namespace cc | 112 } // namespace cc |
107 | 113 |
108 #endif // CC_PICTURE_LAYER_TILING_H_ | 114 #endif // CC_PICTURE_LAYER_TILING_H_ |
OLD | NEW |