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_RESOURCES_PICTURE_LAYER_TILING_H_ | 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
7 | 7 |
| 8 #include <set> |
8 #include <utility> | 9 #include <utility> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "cc/base/cc_export.h" | 15 #include "cc/base/cc_export.h" |
15 #include "cc/base/region.h" | 16 #include "cc/base/region.h" |
16 #include "cc/base/tiling_data.h" | 17 #include "cc/base/tiling_data.h" |
17 #include "cc/resources/tile.h" | 18 #include "cc/resources/tile.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // tiling is becoming recycled. This may include some tiles which are | 255 // tiling is becoming recycled. This may include some tiles which are |
255 // not in the the pending tiling (due to invalidations). This must | 256 // not in the the pending tiling (due to invalidations). This must |
256 // be called before DidBecomeActive, as it resets the active priority | 257 // be called before DidBecomeActive, as it resets the active priority |
257 // while DidBecomeActive promotes pending priority on a similar set of tiles. | 258 // while DidBecomeActive promotes pending priority on a similar set of tiles. |
258 void DidBecomeRecycled(); | 259 void DidBecomeRecycled(); |
259 | 260 |
260 bool NeedsUpdateForFrameAtTime(double frame_time_in_seconds) { | 261 bool NeedsUpdateForFrameAtTime(double frame_time_in_seconds) { |
261 return frame_time_in_seconds != last_impl_frame_time_in_seconds_; | 262 return frame_time_in_seconds != last_impl_frame_time_in_seconds_; |
262 } | 263 } |
263 | 264 |
| 265 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; |
264 void AsValueInto(base::debug::TracedValue* array) const; | 266 void AsValueInto(base::debug::TracedValue* array) const; |
265 size_t GPUMemoryUsageInBytes() const; | 267 size_t GPUMemoryUsageInBytes() const; |
266 | 268 |
267 struct RectExpansionCache { | 269 struct RectExpansionCache { |
268 RectExpansionCache(); | 270 RectExpansionCache(); |
269 | 271 |
270 gfx::Rect previous_start; | 272 gfx::Rect previous_start; |
271 gfx::Rect previous_bounds; | 273 gfx::Rect previous_bounds; |
272 gfx::Rect previous_result; | 274 gfx::Rect previous_result; |
273 int64 previous_target; | 275 int64 previous_target; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 359 |
358 private: | 360 private: |
359 DISALLOW_ASSIGN(PictureLayerTiling); | 361 DISALLOW_ASSIGN(PictureLayerTiling); |
360 | 362 |
361 RectExpansionCache expansion_cache_; | 363 RectExpansionCache expansion_cache_; |
362 }; | 364 }; |
363 | 365 |
364 } // namespace cc | 366 } // namespace cc |
365 | 367 |
366 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 368 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
OLD | NEW |