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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 bool gather_pixels_refs, | 58 bool gather_pixels_refs, |
59 RecordingMode recording_mode); | 59 RecordingMode recording_mode); |
60 static scoped_refptr<Picture> CreateFromValue(const base::Value* value); | 60 static scoped_refptr<Picture> CreateFromValue(const base::Value* value); |
61 static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value); | 61 static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value); |
62 | 62 |
63 gfx::Rect LayerRect() const { return layer_rect_; } | 63 gfx::Rect LayerRect() const { return layer_rect_; } |
64 | 64 |
65 // Has Record() been called yet? | 65 // Has Record() been called yet? |
66 bool HasRecording() const { return picture_.get() != NULL; } | 66 bool HasRecording() const { return picture_.get() != NULL; } |
67 | 67 |
68 bool IsSuitableForGpuRasterization() const; | 68 bool IsSuitableForGpuRasterization(const char** reason) const; |
69 int ApproximateOpCount() const; | 69 int ApproximateOpCount() const; |
70 | 70 |
71 bool HasText() const; | 71 bool HasText() const; |
72 | 72 |
73 // Apply this scale and raster the negated region into the canvas. | 73 // Apply this scale and raster the negated region into the canvas. |
74 // |negated_content_region| specifies the region to be clipped out of the | 74 // |negated_content_region| specifies the region to be clipped out of the |
75 // raster operation, i.e., the parts of the canvas which will not get drawn | 75 // raster operation, i.e., the parts of the canvas which will not get drawn |
76 // to. | 76 // to. |
77 int Raster(SkCanvas* canvas, | 77 int Raster(SkCanvas* canvas, |
78 SkDrawPictureCallback* callback, | 78 SkDrawPictureCallback* callback, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 AsTraceableRecordData() const; | 160 AsTraceableRecordData() const; |
161 | 161 |
162 friend class base::RefCountedThreadSafe<Picture>; | 162 friend class base::RefCountedThreadSafe<Picture>; |
163 friend class PixelRefIterator; | 163 friend class PixelRefIterator; |
164 DISALLOW_COPY_AND_ASSIGN(Picture); | 164 DISALLOW_COPY_AND_ASSIGN(Picture); |
165 }; | 165 }; |
166 | 166 |
167 } // namespace cc | 167 } // namespace cc |
168 | 168 |
169 #endif // CC_RESOURCES_PICTURE_H_ | 169 #endif // CC_RESOURCES_PICTURE_H_ |
OLD | NEW |