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_TILES_PICTURE_LAYER_TILING_H_ | 5 #ifndef CC_TILES_PICTURE_LAYER_TILING_H_ |
6 #define CC_TILES_PICTURE_LAYER_TILING_H_ | 6 #define CC_TILES_PICTURE_LAYER_TILING_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
| 12 #include <memory> |
12 #include <unordered_map> | 13 #include <unordered_map> |
13 #include <utility> | 14 #include <utility> |
14 #include <vector> | 15 #include <vector> |
15 | 16 |
16 #include "base/macros.h" | 17 #include "base/macros.h" |
17 #include "base/memory/scoped_ptr.h" | |
18 #include "cc/base/cc_export.h" | 18 #include "cc/base/cc_export.h" |
19 #include "cc/base/region.h" | 19 #include "cc/base/region.h" |
20 #include "cc/base/tiling_data.h" | 20 #include "cc/base/tiling_data.h" |
21 #include "cc/tiles/tile.h" | 21 #include "cc/tiles/tile.h" |
22 #include "cc/tiles/tile_priority.h" | 22 #include "cc/tiles/tile_priority.h" |
23 #include "cc/trees/occlusion.h" | 23 #include "cc/trees/occlusion.h" |
24 #include "ui/gfx/geometry/rect.h" | 24 #include "ui/gfx/geometry/rect.h" |
25 | 25 |
26 namespace base { | 26 namespace base { |
27 namespace trace_event { | 27 namespace trace_event { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 static const int kBorderTexels = 1; | 81 static const int kBorderTexels = 1; |
82 | 82 |
83 PictureLayerTilingClient* client() const { return client_; } | 83 PictureLayerTilingClient* client() const { return client_; } |
84 ~PictureLayerTiling(); | 84 ~PictureLayerTiling(); |
85 | 85 |
86 static float CalculateSoonBorderDistance( | 86 static float CalculateSoonBorderDistance( |
87 const gfx::Rect& visible_rect_in_content_space, | 87 const gfx::Rect& visible_rect_in_content_space, |
88 float content_to_screen_scale); | 88 float content_to_screen_scale); |
89 | 89 |
90 // Create a tiling with no tiles. CreateTile() must be called to add some. | 90 // Create a tiling with no tiles. CreateTile() must be called to add some. |
91 static scoped_ptr<PictureLayerTiling> Create( | 91 static std::unique_ptr<PictureLayerTiling> Create( |
92 WhichTree tree, | 92 WhichTree tree, |
93 float contents_scale, | 93 float contents_scale, |
94 scoped_refptr<RasterSource> raster_source, | 94 scoped_refptr<RasterSource> raster_source, |
95 PictureLayerTilingClient* client, | 95 PictureLayerTilingClient* client, |
96 size_t tiling_interest_area_padding, | 96 size_t tiling_interest_area_padding, |
97 float skewport_target_time_in_seconds, | 97 float skewport_target_time_in_seconds, |
98 int skewport_extrapolation_limit_in_content_pixels); | 98 int skewport_extrapolation_limit_in_content_pixels); |
99 | 99 |
100 void SetRasterSourceAndResize(scoped_refptr<RasterSource> raster_source); | 100 void SetRasterSourceAndResize(scoped_refptr<RasterSource> raster_source); |
101 void Invalidate(const Region& layer_invalidation); | 101 void Invalidate(const Region& layer_invalidation); |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 bool all_tiles_done_; | 405 bool all_tiles_done_; |
406 bool invalidated_since_last_compute_priority_rects_; | 406 bool invalidated_since_last_compute_priority_rects_; |
407 | 407 |
408 private: | 408 private: |
409 DISALLOW_COPY_AND_ASSIGN(PictureLayerTiling); | 409 DISALLOW_COPY_AND_ASSIGN(PictureLayerTiling); |
410 }; | 410 }; |
411 | 411 |
412 } // namespace cc | 412 } // namespace cc |
413 | 413 |
414 #endif // CC_TILES_PICTURE_LAYER_TILING_H_ | 414 #endif // CC_TILES_PICTURE_LAYER_TILING_H_ |
OLD | NEW |