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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 bool HasRecording() const { return picture_.get() != NULL; } | 71 bool HasRecording() const { return picture_.get() != NULL; } |
72 | 72 |
73 // Apply this contents scale and raster the content rect into the canvas. | 73 // Apply this contents scale and raster the content rect into the canvas. |
74 void Raster(SkCanvas* canvas, | 74 void Raster(SkCanvas* canvas, |
75 SkDrawPictureCallback* callback, | 75 SkDrawPictureCallback* callback, |
76 gfx::Rect content_rect, | 76 gfx::Rect content_rect, |
77 float contents_scale, | 77 float contents_scale, |
78 bool enable_lcd_text); | 78 bool enable_lcd_text); |
79 | 79 |
80 scoped_ptr<base::Value> AsValue() const; | 80 scoped_ptr<base::Value> AsValue() const; |
| 81 void DidBeginTracing(); |
81 | 82 |
82 class CC_EXPORT PixelRefIterator { | 83 class CC_EXPORT PixelRefIterator { |
83 public: | 84 public: |
84 PixelRefIterator(); | 85 PixelRefIterator(); |
85 PixelRefIterator(gfx::Rect layer_rect, const Picture* picture); | 86 PixelRefIterator(gfx::Rect layer_rect, const Picture* picture); |
86 ~PixelRefIterator(); | 87 ~PixelRefIterator(); |
87 | 88 |
88 skia::LazyPixelRef* operator->() const { | 89 skia::LazyPixelRef* operator->() const { |
89 DCHECK_LT(current_index_, current_pixel_refs_->size()); | 90 DCHECK_LT(current_index_, current_pixel_refs_->size()); |
90 return (*current_pixel_refs_)[current_index_]; | 91 return (*current_pixel_refs_)[current_index_]; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 AsTraceableRasterData(gfx::Rect rect, float scale); | 140 AsTraceableRasterData(gfx::Rect rect, float scale); |
140 | 141 |
141 friend class base::RefCountedThreadSafe<Picture>; | 142 friend class base::RefCountedThreadSafe<Picture>; |
142 friend class PixelRefIterator; | 143 friend class PixelRefIterator; |
143 DISALLOW_COPY_AND_ASSIGN(Picture); | 144 DISALLOW_COPY_AND_ASSIGN(Picture); |
144 }; | 145 }; |
145 | 146 |
146 } // namespace cc | 147 } // namespace cc |
147 | 148 |
148 #endif // CC_RESOURCES_PICTURE_H_ | 149 #endif // CC_RESOURCES_PICTURE_H_ |
OLD | NEW |