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 <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Get thread-safe clone for rasterizing with on a specific thread. | 53 // Get thread-safe clone for rasterizing with on a specific thread. |
54 scoped_refptr<Picture> GetCloneForDrawingOnThread( | 54 scoped_refptr<Picture> GetCloneForDrawingOnThread( |
55 unsigned thread_index) const; | 55 unsigned thread_index) const; |
56 | 56 |
57 // Make thread-safe clones for rasterizing with. | 57 // Make thread-safe clones for rasterizing with. |
58 void CloneForDrawing(int num_threads); | 58 void CloneForDrawing(int num_threads); |
59 | 59 |
60 // Record a paint operation. To be able to safely use this SkPicture for | 60 // Record a paint operation. To be able to safely use this SkPicture for |
61 // playback on a different thread this can only be called once. | 61 // playback on a different thread this can only be called once. |
62 void Record(ContentLayerClient* client, | 62 void Record(ContentLayerClient* client, |
63 const SkTileGridPicture::TileGridInfo& tile_grid_info, | 63 const SkTileGridPicture::TileGridInfo& tile_grid_info); |
64 RenderingStatsInstrumentation* stats_instrumentation); | |
65 | 64 |
66 // Gather pixel refs from recording. | 65 // Gather pixel refs from recording. |
67 void GatherPixelRefs(const SkTileGridPicture::TileGridInfo& tile_grid_info, | 66 void GatherPixelRefs(const SkTileGridPicture::TileGridInfo& tile_grid_info, |
68 RenderingStatsInstrumentation* stats_instrumentation); | 67 RenderingStatsInstrumentation* stats_instrumentation); |
69 | 68 |
70 // Has Record() been called yet? | 69 // Has Record() been called yet? |
71 bool HasRecording() const { return picture_.get() != NULL; } | 70 bool HasRecording() const { return picture_.get() != NULL; } |
72 | 71 |
73 // Apply this contents scale and raster the content rect into the canvas. | 72 // Apply this contents scale and raster the content rect into the canvas. |
74 void Raster(SkCanvas* canvas, | 73 void Raster(SkCanvas* canvas, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 AsTraceableRecordData() const; | 149 AsTraceableRecordData() const; |
151 | 150 |
152 friend class base::RefCountedThreadSafe<Picture>; | 151 friend class base::RefCountedThreadSafe<Picture>; |
153 friend class PixelRefIterator; | 152 friend class PixelRefIterator; |
154 DISALLOW_COPY_AND_ASSIGN(Picture); | 153 DISALLOW_COPY_AND_ASSIGN(Picture); |
155 }; | 154 }; |
156 | 155 |
157 } // namespace cc | 156 } // namespace cc |
158 | 157 |
159 #endif // CC_RESOURCES_PICTURE_H_ | 158 #endif // CC_RESOURCES_PICTURE_H_ |
OLD | NEW |