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 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 static scoped_refptr<PicturePileImpl> CreateFromOther( | 23 static scoped_refptr<PicturePileImpl> CreateFromOther( |
24 const PicturePileBase* other, | 24 const PicturePileBase* other, |
25 bool enable_lcd_text); | 25 bool enable_lcd_text); |
26 | 26 |
27 // Get paint-safe version of this picture for a specific thread. | 27 // Get paint-safe version of this picture for a specific thread. |
28 PicturePileImpl* GetCloneForDrawingOnThread(unsigned thread_index) const; | 28 PicturePileImpl* GetCloneForDrawingOnThread(unsigned thread_index) const; |
29 | 29 |
30 // Raster a subrect of this PicturePileImpl into the given canvas. | 30 // Raster a subrect of this PicturePileImpl into the given canvas. |
31 // It's only safe to call paint on a cloned version. | 31 // It's only safe to call paint on a cloned version. |
32 // It is assumed that contents_scale has already been applied to this canvas. | 32 // It is assumed that contents_scale has already been applied to this canvas. |
33 void Raster( | 33 // Return value is the total number of pixels rasterized. |
| 34 int64 Raster( |
34 SkCanvas* canvas, | 35 SkCanvas* canvas, |
35 gfx::Rect canvas_rect, | 36 gfx::Rect canvas_rect, |
36 float contents_scale, | 37 float contents_scale); |
37 int64* total_pixels_rasterized); | |
38 | 38 |
39 void GatherPixelRefs( | 39 void GatherPixelRefs( |
40 gfx::Rect content_rect, | 40 gfx::Rect content_rect, |
41 float contents_scale, | 41 float contents_scale, |
42 std::list<skia::LazyPixelRef*>& pixel_refs); | 42 std::list<skia::LazyPixelRef*>& pixel_refs); |
43 | 43 |
44 skia::RefPtr<SkPicture> GetFlattenedPicture(); | 44 skia::RefPtr<SkPicture> GetFlattenedPicture(); |
45 | 45 |
46 struct Analysis { | 46 struct Analysis { |
47 Analysis(); | 47 Analysis(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // instance. This member variable must be last so that other member | 88 // instance. This member variable must be last so that other member |
89 // variables have already been initialized and can be clonable. | 89 // variables have already been initialized and can be clonable. |
90 const ClonesForDrawing clones_for_drawing_; | 90 const ClonesForDrawing clones_for_drawing_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 92 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace cc | 95 } // namespace cc |
96 | 96 |
97 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 97 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
OLD | NEW |