Index: cc/resources/picture_pile_impl.h |
diff --git a/cc/resources/picture_pile_impl.h b/cc/resources/picture_pile_impl.h |
index 9b49ed9d0420af393216345ee6ff2d253fda540f..b5d265efbc6f2804a700d3a69c72ab4a62be8472 100644 |
--- a/cc/resources/picture_pile_impl.h |
+++ b/cc/resources/picture_pile_impl.h |
@@ -37,11 +37,6 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase { |
gfx::Rect canvas_rect, |
float contents_scale); |
- void GatherPixelRefs( |
- gfx::Rect content_rect, |
- float contents_scale, |
- std::list<skia::LazyPixelRef*>& pixel_refs); |
- |
skia::RefPtr<SkPicture> GetFlattenedPicture(); |
struct Analysis { |
@@ -61,8 +56,30 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase { |
float contents_scale, |
Analysis* analysis); |
+ class CC_EXPORT LazyPixelRefsIterator { |
+ public: |
+ LazyPixelRefsIterator(gfx::Rect content_rect, |
+ float contents_scale, |
+ const PicturePileImpl* picture_pile); |
+ ~LazyPixelRefsIterator(); |
+ |
+ skia::LazyPixelRef* operator->() const { return current_pixel_ref_; } |
+ skia::LazyPixelRef* operator*() const { return current_pixel_ref_; } |
+ LazyPixelRefsIterator& operator++(); |
+ operator bool() const { return !!current_pixel_ref_; } |
+ |
+ private: |
+ const PicturePileImpl* picture_pile_; |
+ gfx::Rect layer_rect_; |
+ TilingData::Iterator tile_iterator_; |
+ Picture::LazyPixelRefsIterator picture_refs_iterator_; |
+ PictureList picture_list_; |
+ skia::LazyPixelRef* current_pixel_ref_; |
+ }; |
+ |
protected: |
friend class PicturePile; |
+ friend class LazyPixelRefsIterator; |
explicit PicturePileImpl(bool enable_lcd_text); |
PicturePileImpl(const PicturePileBase* other, bool enable_lcd_text); |