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 size_t ApproximateMemoryUsage() const; | 70 size_t ApproximateMemoryUsage() const; |
71 | 71 |
72 bool HasText() const; | 72 bool HasText() const; |
73 | 73 |
74 // Apply this scale and raster the negated region into the canvas. | 74 // Apply this scale and raster the negated region into the canvas. |
75 // |negated_content_region| specifies the region to be clipped out of the | 75 // |negated_content_region| specifies the region to be clipped out of the |
76 // raster operation, i.e., the parts of the canvas which will not get drawn | 76 // raster operation, i.e., the parts of the canvas which will not get drawn |
77 // to. | 77 // to. |
78 int Raster(SkCanvas* canvas, | 78 int Raster(SkCanvas* canvas, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 AsTraceableRecordData() const; | 161 AsTraceableRecordData() const; |
162 | 162 |
163 friend class base::RefCountedThreadSafe<Picture>; | 163 friend class base::RefCountedThreadSafe<Picture>; |
164 friend class PixelRefIterator; | 164 friend class PixelRefIterator; |
165 DISALLOW_COPY_AND_ASSIGN(Picture); | 165 DISALLOW_COPY_AND_ASSIGN(Picture); |
166 }; | 166 }; |
167 | 167 |
168 } // namespace cc | 168 } // namespace cc |
169 | 169 |
170 #endif // CC_RESOURCES_PICTURE_H_ | 170 #endif // CC_RESOURCES_PICTURE_H_ |
OLD | NEW |