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 <list> | 8 #include <list> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void Raster(SkCanvas* canvas, | 53 void Raster(SkCanvas* canvas, |
54 gfx::Rect content_rect, | 54 gfx::Rect content_rect, |
55 float contents_scale, | 55 float contents_scale, |
56 bool enable_lcd_text); | 56 bool enable_lcd_text); |
57 | 57 |
58 void GatherPixelRefs( | 58 void GatherPixelRefs( |
59 const gfx::Rect& layer_rect, | 59 const gfx::Rect& layer_rect, |
60 std::list<skia::LazyPixelRef*>& pixel_ref_list); | 60 std::list<skia::LazyPixelRef*>& pixel_ref_list); |
61 | 61 |
62 private: | 62 private: |
63 Picture(gfx::Rect layer_rect); | 63 explicit Picture(gfx::Rect layer_rect); |
64 // This constructor assumes SkPicture is already ref'd and transfers | 64 // This constructor assumes SkPicture is already ref'd and transfers |
65 // ownership to this picture. | 65 // ownership to this picture. |
66 Picture(const skia::RefPtr<SkPicture>&, | 66 Picture(const skia::RefPtr<SkPicture>&, |
67 gfx::Rect layer_rect, | 67 gfx::Rect layer_rect, |
68 gfx::Rect opaque_rect); | 68 gfx::Rect opaque_rect); |
69 ~Picture(); | 69 ~Picture(); |
70 | 70 |
71 gfx::Rect layer_rect_; | 71 gfx::Rect layer_rect_; |
72 gfx::Rect opaque_rect_; | 72 gfx::Rect opaque_rect_; |
73 skia::RefPtr<SkPicture> picture_; | 73 skia::RefPtr<SkPicture> picture_; |
74 | 74 |
75 typedef std::vector<scoped_refptr<Picture> > PictureVector; | 75 typedef std::vector<scoped_refptr<Picture> > PictureVector; |
76 PictureVector clones_; | 76 PictureVector clones_; |
77 | 77 |
78 friend class base::RefCountedThreadSafe<Picture>; | 78 friend class base::RefCountedThreadSafe<Picture>; |
79 DISALLOW_COPY_AND_ASSIGN(Picture); | 79 DISALLOW_COPY_AND_ASSIGN(Picture); |
80 }; | 80 }; |
81 | 81 |
82 } // namespace cc | 82 } // namespace cc |
83 | 83 |
84 #endif // CC_RESOURCES_PICTURE_H_ | 84 #endif // CC_RESOURCES_PICTURE_H_ |
OLD | NEW |