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& device_view_port, |
| 90 float layer_content_scale_x, |
| 91 float layer_content_scale_y, |
| 92 const gfx::Transform& last_screen_transform, |
| 93 const gfx::Transform& current_screen_transform, |
| 94 double time_delta); |
| 95 |
89 protected: | 96 protected: |
90 typedef std::pair<int, int> TileMapKey; | 97 typedef std::pair<int, int> TileMapKey; |
91 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; | 98 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; |
92 | 99 |
93 PictureLayerTiling(float contents_scale, gfx::Size tileSize); | 100 PictureLayerTiling(float contents_scale, gfx::Size tileSize); |
94 Tile* TileAt(int, int) const; | 101 Tile* TileAt(int, int) const; |
95 void CreateTile(int i, int j); | 102 void CreateTile(int i, int j); |
96 | 103 |
97 PictureLayerTilingClient* client_; | 104 PictureLayerTilingClient* client_; |
98 float contents_scale_; | 105 float contents_scale_; |
99 gfx::Size layer_bounds_; | 106 gfx::Size layer_bounds_; |
100 TileMap tiles_; | 107 TileMap tiles_; |
101 TilingData tiling_data_; | 108 TilingData tiling_data_; |
102 | 109 |
103 friend class Iterator; | 110 friend class Iterator; |
104 }; | 111 }; |
105 | 112 |
106 } // namespace cc | 113 } // namespace cc |
107 | 114 |
108 #endif // CC_PICTURE_LAYER_TILING_H_ | 115 #endif // CC_PICTURE_LAYER_TILING_H_ |
OLD | NEW |