OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PILE_BASE_H_ | 5 #ifndef CC_RESOURCES_PICTURE_PILE_BASE_H_ |
6 #define CC_RESOURCES_PICTURE_PILE_BASE_H_ | 6 #define CC_RESOURCES_PICTURE_PILE_BASE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 void UpdateRecordedRegion(); | 32 void UpdateRecordedRegion(); |
33 const Region& recorded_region() const { return recorded_region_; } | 33 const Region& recorded_region() const { return recorded_region_; } |
34 | 34 |
35 int num_tiles_x() const { return tiling_.num_tiles_x(); } | 35 int num_tiles_x() const { return tiling_.num_tiles_x(); } |
36 int num_tiles_y() const { return tiling_.num_tiles_y(); } | 36 int num_tiles_y() const { return tiling_.num_tiles_y(); } |
37 gfx::Rect tile_bounds(int x, int y) const { return tiling_.TileBounds(x, y); } | 37 gfx::Rect tile_bounds(int x, int y) const { return tiling_.TileBounds(x, y); } |
38 bool HasRecordingAt(int x, int y); | 38 bool HasRecordingAt(int x, int y); |
39 bool CanRaster(float contents_scale, gfx::Rect content_rect); | 39 bool CanRaster(float contents_scale, gfx::Rect content_rect); |
40 | 40 |
41 void SetTileGridSize(const gfx::Size& tile_grid_size); | 41 void SetTileGridSize(const gfx::Size& tile_grid_size); |
| 42 TilingData& tiling() { return tiling_; } |
42 | 43 |
43 protected: | 44 protected: |
44 virtual ~PicturePileBase(); | 45 virtual ~PicturePileBase(); |
45 | 46 |
46 int num_raster_threads() { return num_raster_threads_; } | 47 int num_raster_threads() { return num_raster_threads_; } |
47 int buffer_pixels() const { return tiling_.border_texels(); } | 48 int buffer_pixels() const { return tiling_.border_texels(); } |
48 void Clear(); | 49 void Clear(); |
49 | 50 |
50 typedef std::pair<int, int> PictureListMapKey; | 51 typedef std::pair<int, int> PictureListMapKey; |
51 typedef std::list<scoped_refptr<Picture> > PictureList; | 52 typedef std::list<scoped_refptr<Picture> > PictureList; |
(...skipping 14 matching lines...) Expand all Loading... |
66 private: | 67 private: |
67 void SetBufferPixels(int buffer_pixels); | 68 void SetBufferPixels(int buffer_pixels); |
68 | 69 |
69 friend class base::RefCounted<PicturePileBase>; | 70 friend class base::RefCounted<PicturePileBase>; |
70 DISALLOW_COPY_AND_ASSIGN(PicturePileBase); | 71 DISALLOW_COPY_AND_ASSIGN(PicturePileBase); |
71 }; | 72 }; |
72 | 73 |
73 } // namespace cc | 74 } // namespace cc |
74 | 75 |
75 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_ | 76 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_ |
OLD | NEW |