Index: cc/resources/picture.h |
diff --git a/cc/resources/picture.h b/cc/resources/picture.h |
index 8598fbf62b3c0a7ce983c9acd10737ef19e71d4a..2627117f2867d36b240c250ccb65977af75febf2 100644 |
--- a/cc/resources/picture.h |
+++ b/cc/resources/picture.h |
@@ -60,14 +60,26 @@ class CC_EXPORT Picture |
std::list<skia::LazyPixelRef*>& pixel_ref_list); |
private: |
+ struct PositionPixelRefs { |
+ gfx::Rect rect; |
+ std::list<skia::LazyPixelRef*> pixel_refs; |
+ }; |
+ typedef std::vector<PositionPixelRefs> PositionPixelRefsVector; |
reveman
2013/04/16 18:38:35
how about using:
base::hash_map<std::pair<int, int
enne (OOO)
2013/04/16 22:03:36
For a recorded tile, you mean? I think the origin
reveman
2013/04/17 00:25:28
we're trying to get the pixel refs for a playback
|
+ |
explicit Picture(gfx::Rect layer_rect); |
// This constructor assumes SkPicture is already ref'd and transfers |
// ownership to this picture. |
Picture(const skia::RefPtr<SkPicture>&, |
gfx::Rect layer_rect, |
- gfx::Rect opaque_rect); |
+ gfx::Rect opaque_rect, |
+ const PositionPixelRefsVector& lazy_pixel_refs); |
~Picture(); |
+ void GatherPixelRefsFromSkia( |
+ const gfx::Rect& layer_rect, |
+ std::list<skia::LazyPixelRef*>& pixel_ref_list); |
+ void GatherAllPixelRefs(); |
+ |
gfx::Rect layer_rect_; |
gfx::Rect opaque_rect_; |
skia::RefPtr<SkPicture> picture_; |
@@ -75,6 +87,8 @@ class CC_EXPORT Picture |
typedef std::vector<scoped_refptr<Picture> > PictureVector; |
PictureVector clones_; |
+ PositionPixelRefsVector lazy_pixel_refs_; |
enne (OOO)
2013/04/16 22:03:36
These are safe to store using raw pointers because
|
+ |
friend class base::RefCountedThreadSafe<Picture>; |
DISALLOW_COPY_AND_ASSIGN(Picture); |
}; |