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 <bitset> | 8 #include <bitset> |
9 #include <list> | 9 #include <list> |
10 #include <utility> | 10 #include <utility> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 int num_tiles_y() const { return tiling_.num_tiles_y(); } | 43 int num_tiles_y() const { return tiling_.num_tiles_y(); } |
44 gfx::Rect tile_bounds(int x, int y) const { return tiling_.TileBounds(x, y); } | 44 gfx::Rect tile_bounds(int x, int y) const { return tiling_.TileBounds(x, y); } |
45 bool HasRecordingAt(int x, int y); | 45 bool HasRecordingAt(int x, int y); |
46 bool CanRaster(float contents_scale, const gfx::Rect& content_rect); | 46 bool CanRaster(float contents_scale, const gfx::Rect& content_rect); |
47 | 47 |
48 // If this pile contains any valid recordings. May have false positives. | 48 // If this pile contains any valid recordings. May have false positives. |
49 bool HasRecordings() const { return has_any_recordings_; } | 49 bool HasRecordings() const { return has_any_recordings_; } |
50 | 50 |
51 // If this pile has ever contained any recordings with text. | 51 // If this pile has ever contained any recordings with text. |
52 bool has_text() const { return has_text_; } | 52 bool has_text() const { return has_text_; } |
53 bool is_solid_color() const { return is_solid_color_; } | |
danakj
2014/09/15 16:32:31
nit: whitespace above
hendrikw
2014/09/15 16:59:40
Acknowledged.
| |
54 SkColor get_solid_color() const { return solid_color_; } | |
danakj
2014/09/15 16:32:31
style nit: accessors of this form should match the
hendrikw
2014/09/15 16:59:40
Acknowledged.
| |
53 | 55 |
54 void set_is_mask(bool is_mask) { is_mask_ = is_mask; } | 56 void set_is_mask(bool is_mask) { is_mask_ = is_mask; } |
55 bool is_mask() const { return is_mask_; } | 57 bool is_mask() const { return is_mask_; } |
56 | 58 |
57 static void ComputeTileGridInfo(const gfx::Size& tile_grid_size, | 59 static void ComputeTileGridInfo(const gfx::Size& tile_grid_size, |
58 SkTileGridFactory::TileGridInfo* info); | 60 SkTileGridFactory::TileGridInfo* info); |
59 | 61 |
60 void SetTileGridSize(const gfx::Size& tile_grid_size); | 62 void SetTileGridSize(const gfx::Size& tile_grid_size); |
61 TilingData& tiling() { return tiling_; } | 63 TilingData& tiling() { return tiling_; } |
62 | 64 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 int slow_down_raster_scale_factor_for_debug_; | 118 int slow_down_raster_scale_factor_for_debug_; |
117 bool contents_opaque_; | 119 bool contents_opaque_; |
118 bool contents_fill_bounds_completely_; | 120 bool contents_fill_bounds_completely_; |
119 bool show_debug_picture_borders_; | 121 bool show_debug_picture_borders_; |
120 bool clear_canvas_with_debug_color_; | 122 bool clear_canvas_with_debug_color_; |
121 // A hint about whether there are any recordings. This may be a false | 123 // A hint about whether there are any recordings. This may be a false |
122 // positive. | 124 // positive. |
123 bool has_any_recordings_; | 125 bool has_any_recordings_; |
124 bool has_text_; | 126 bool has_text_; |
125 bool is_mask_; | 127 bool is_mask_; |
128 bool is_solid_color_; | |
129 SkColor solid_color_; | |
126 | 130 |
127 private: | 131 private: |
128 void SetBufferPixels(int buffer_pixels); | 132 void SetBufferPixels(int buffer_pixels); |
129 | 133 |
130 friend class base::RefCounted<PicturePileBase>; | 134 friend class base::RefCounted<PicturePileBase>; |
131 DISALLOW_COPY_AND_ASSIGN(PicturePileBase); | 135 DISALLOW_COPY_AND_ASSIGN(PicturePileBase); |
132 }; | 136 }; |
133 | 137 |
134 } // namespace cc | 138 } // namespace cc |
135 | 139 |
136 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_ | 140 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_ |
OLD | NEW |