| 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_H_ | 5 #ifndef CC_RESOURCES_PICTURE_H_ |
| 6 #define CC_RESOURCES_PICTURE_H_ | 6 #define CC_RESOURCES_PICTURE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // Get thread-safe clone for rasterizing with on a specific thread. | 37 // Get thread-safe clone for rasterizing with on a specific thread. |
| 38 scoped_refptr<Picture> GetCloneForDrawingOnThread( | 38 scoped_refptr<Picture> GetCloneForDrawingOnThread( |
| 39 unsigned thread_index) const; | 39 unsigned thread_index) const; |
| 40 | 40 |
| 41 // Make thread-safe clones for rasterizing with. | 41 // Make thread-safe clones for rasterizing with. |
| 42 void CloneForDrawing(int num_threads); | 42 void CloneForDrawing(int num_threads); |
| 43 | 43 |
| 44 // Record a paint operation. To be able to safely use this SkPicture for | 44 // Record a paint operation. To be able to safely use this SkPicture for |
| 45 // playback on a different thread this can only be called once. | 45 // playback on a different thread this can only be called once. |
| 46 void Record(ContentLayerClient*, RenderingStats*, | 46 void Record(ContentLayerClient*, RenderingStats*, |
| 47 const SkTileGridPicture::TileGridInfo& tileGridInfo); | 47 const SkTileGridPicture::TileGridInfo& tile_grid_info); |
| 48 | 48 |
| 49 // Has Record() been called yet? | 49 // Has Record() been called yet? |
| 50 bool HasRecording() const { return picture_.get() != NULL; } | 50 bool HasRecording() const { return picture_.get() != NULL; } |
| 51 | 51 |
| 52 // Apply this contents scale and raster the content rect into the canvas. | 52 // Apply this contents scale and raster the content rect into the canvas. |
| 53 void Raster(SkCanvas* canvas, | 53 void Raster(SkCanvas* canvas, |
| 54 gfx::Rect content_rect, | 54 gfx::Rect content_rect, |
| 55 float contents_scale, | 55 float contents_scale, |
| 56 bool enable_lcd_text); | 56 bool enable_lcd_text); |
| 57 | 57 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 75 typedef std::vector<scoped_refptr<Picture> > PictureVector; | 75 typedef std::vector<scoped_refptr<Picture> > PictureVector; |
| 76 PictureVector clones_; | 76 PictureVector clones_; |
| 77 | 77 |
| 78 friend class base::RefCountedThreadSafe<Picture>; | 78 friend class base::RefCountedThreadSafe<Picture>; |
| 79 DISALLOW_COPY_AND_ASSIGN(Picture); | 79 DISALLOW_COPY_AND_ASSIGN(Picture); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace cc | 82 } // namespace cc |
| 83 | 83 |
| 84 #endif // CC_RESOURCES_PICTURE_H_ | 84 #endif // CC_RESOURCES_PICTURE_H_ |
| OLD | NEW |