| 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 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 static scoped_refptr<PicturePileImpl> Create(); | 22 static scoped_refptr<PicturePileImpl> Create(); |
| 23 static scoped_refptr<PicturePileImpl> CreateFromOther( | 23 static scoped_refptr<PicturePileImpl> CreateFromOther( |
| 24 const PicturePileBase* other); | 24 const PicturePileBase* other); |
| 25 | 25 |
| 26 // Get paint-safe version of this picture for a specific thread. | 26 // Get paint-safe version of this picture for a specific thread. |
| 27 PicturePileImpl* GetCloneForDrawingOnThread(unsigned thread_index) const; | 27 PicturePileImpl* GetCloneForDrawingOnThread(unsigned thread_index) const; |
| 28 | 28 |
| 29 // Raster a subrect of this PicturePileImpl into the given canvas. | 29 // Raster a subrect of this PicturePileImpl into the given canvas. |
| 30 // It's only safe to call paint on a cloned version. | 30 // It's only safe to call paint on a cloned version. |
| 31 // It is assumed that contentsScale has already been applied to this canvas. | 31 // It is assumed that contents_scale has already been applied to this canvas. |
| 32 void Raster( | 32 void Raster( |
| 33 SkCanvas* canvas, | 33 SkCanvas* canvas, |
| 34 gfx::Rect canvas_rect, | 34 gfx::Rect canvas_rect, |
| 35 float contents_scale, | 35 float contents_scale, |
| 36 int64* total_pixels_rasterized); | 36 int64* total_pixels_rasterized); |
| 37 | 37 |
| 38 void GatherPixelRefs( | 38 void GatherPixelRefs( |
| 39 gfx::Rect content_rect, | 39 gfx::Rect content_rect, |
| 40 float contents_scale, | 40 float contents_scale, |
| 41 std::list<skia::LazyPixelRef*>& pixel_refs); | 41 std::list<skia::LazyPixelRef*>& pixel_refs); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // This guarantees thread-safe access during the life | 84 // This guarantees thread-safe access during the life |
| 85 // time of a PicturePileImpl instance. | 85 // time of a PicturePileImpl instance. |
| 86 const ClonesForDrawing clones_for_drawing_; | 86 const ClonesForDrawing clones_for_drawing_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 88 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace cc | 91 } // namespace cc |
| 92 | 92 |
| 93 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 93 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
| OLD | NEW |