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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 const SkTileGridPicture::TileGridInfo& tile_grid_info, | 50 const SkTileGridPicture::TileGridInfo& tile_grid_info, |
51 bool gather_pixels_refs, | 51 bool gather_pixels_refs, |
52 int num_raster_threads); | 52 int num_raster_threads); |
53 static scoped_refptr<Picture> CreateFromValue(const base::Value* value); | 53 static scoped_refptr<Picture> CreateFromValue(const base::Value* value); |
54 static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value); | 54 static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value); |
55 | 55 |
56 gfx::Rect LayerRect() const { return layer_rect_; } | 56 gfx::Rect LayerRect() const { return layer_rect_; } |
57 gfx::Rect OpaqueRect() const { return opaque_rect_; } | 57 gfx::Rect OpaqueRect() const { return opaque_rect_; } |
58 | 58 |
59 // Get thread-safe clone for rasterizing with on a specific thread. | 59 // Get thread-safe clone for rasterizing with on a specific thread. |
60 scoped_refptr<Picture> GetCloneForDrawingOnThread( | 60 Picture* GetCloneForDrawingOnThread(unsigned thread_index); |
61 unsigned thread_index) const; | |
62 | 61 |
63 // Has Record() been called yet? | 62 // Has Record() been called yet? |
64 bool HasRecording() const { return picture_.get() != NULL; } | 63 bool HasRecording() const { return picture_.get() != NULL; } |
65 | 64 |
66 // Apply this scale and raster the negated region into the canvas. See comment | 65 // Apply this scale and raster the negated region into the canvas. See comment |
67 // in PicturePileImpl::RasterCommon for explanation on negated content region. | 66 // in PicturePileImpl::RasterCommon for explanation on negated content region. |
68 int Raster(SkCanvas* canvas, | 67 int Raster(SkCanvas* canvas, |
69 SkDrawPictureCallback* callback, | 68 SkDrawPictureCallback* callback, |
70 const Region& negated_content_region, | 69 const Region& negated_content_region, |
71 float contents_scale); | 70 float contents_scale); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 base::ThreadChecker raster_thread_checker_; | 158 base::ThreadChecker raster_thread_checker_; |
160 | 159 |
161 friend class base::RefCountedThreadSafe<Picture>; | 160 friend class base::RefCountedThreadSafe<Picture>; |
162 friend class PixelRefIterator; | 161 friend class PixelRefIterator; |
163 DISALLOW_COPY_AND_ASSIGN(Picture); | 162 DISALLOW_COPY_AND_ASSIGN(Picture); |
164 }; | 163 }; |
165 | 164 |
166 } // namespace cc | 165 } // namespace cc |
167 | 166 |
168 #endif // CC_RESOURCES_PICTURE_H_ | 167 #endif // CC_RESOURCES_PICTURE_H_ |
OLD | NEW |