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_PILE_IMPL_H_ | 5 #ifndef CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 29 matching lines...) Expand all Loading... |
40 }; | 40 }; |
41 | 41 |
42 // Raster a subrect of this PicturePileImpl into the given canvas. | 42 // Raster a subrect of this PicturePileImpl into the given canvas. |
43 // It's only safe to call paint on a cloned version. It is assumed | 43 // It's only safe to call paint on a cloned version. It is assumed |
44 // that contents_scale has already been applied to this canvas. | 44 // that contents_scale has already been applied to this canvas. |
45 // Writes the total number of pixels rasterized and the time spent | 45 // Writes the total number of pixels rasterized and the time spent |
46 // rasterizing to the stats if the respective pointer is not | 46 // rasterizing to the stats if the respective pointer is not |
47 // NULL. When slow-down-raster-scale-factor is set to a value | 47 // NULL. When slow-down-raster-scale-factor is set to a value |
48 // greater than 1, the reported rasterize time is the minimum | 48 // greater than 1, the reported rasterize time is the minimum |
49 // measured value over all runs. | 49 // measured value over all runs. |
50 void Raster( | 50 void RasterDirect( |
51 SkCanvas* canvas, | 51 SkCanvas* canvas, |
52 gfx::Rect canvas_rect, | 52 gfx::Rect canvas_rect, |
53 float contents_scale, | 53 float contents_scale, |
| 54 RasterStats* raster_stats); |
| 55 |
| 56 // Similar to the above RasterDirect method, but this is a convenience method |
| 57 // for when it is known that the raster is going to an intermediate bitmap |
| 58 // that itself will then be blended and thus that a canvas clear is required. |
| 59 void RasterToBitmap( |
| 60 SkCanvas* canvas, |
| 61 gfx::Rect canvas_rect, |
| 62 float contents_scale, |
54 RasterStats* raster_stats); | 63 RasterStats* raster_stats); |
55 | 64 |
56 skia::RefPtr<SkPicture> GetFlattenedPicture(); | 65 skia::RefPtr<SkPicture> GetFlattenedPicture(); |
57 | 66 |
58 struct CC_EXPORT Analysis { | 67 struct CC_EXPORT Analysis { |
59 Analysis(); | 68 Analysis(); |
60 ~Analysis(); | 69 ~Analysis(); |
61 | 70 |
62 bool is_solid_color; | 71 bool is_solid_color; |
63 bool has_text; | 72 bool has_text; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // instance. This member variable must be last so that other member | 131 // instance. This member variable must be last so that other member |
123 // variables have already been initialized and can be clonable. | 132 // variables have already been initialized and can be clonable. |
124 const ClonesForDrawing clones_for_drawing_; | 133 const ClonesForDrawing clones_for_drawing_; |
125 | 134 |
126 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 135 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
127 }; | 136 }; |
128 | 137 |
129 } // namespace cc | 138 } // namespace cc |
130 | 139 |
131 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 140 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
OLD | NEW |