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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void GatherPixelRefs(const SkTileGridPicture::TileGridInfo& tile_grid_info, | 67 void GatherPixelRefs(const SkTileGridPicture::TileGridInfo& tile_grid_info, |
68 RenderingStats* stats); | 68 RenderingStats* stats); |
69 | 69 |
70 // Has Record() been called yet? | 70 // Has Record() been called yet? |
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); | |
79 | 78 |
80 scoped_ptr<base::Value> AsValue() const; | 79 scoped_ptr<base::Value> AsValue() const; |
81 | 80 |
82 class CC_EXPORT PixelRefIterator { | 81 class CC_EXPORT PixelRefIterator { |
83 public: | 82 public: |
84 PixelRefIterator(); | 83 PixelRefIterator(); |
85 PixelRefIterator(gfx::Rect layer_rect, const Picture* picture); | 84 PixelRefIterator(gfx::Rect layer_rect, const Picture* picture); |
86 ~PixelRefIterator(); | 85 ~PixelRefIterator(); |
87 | 86 |
88 skia::LazyPixelRef* operator->() const { | 87 skia::LazyPixelRef* operator->() const { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 AsTraceableRasterData(gfx::Rect rect, float scale); | 140 AsTraceableRasterData(gfx::Rect rect, float scale); |
142 | 141 |
143 friend class base::RefCountedThreadSafe<Picture>; | 142 friend class base::RefCountedThreadSafe<Picture>; |
144 friend class PixelRefIterator; | 143 friend class PixelRefIterator; |
145 DISALLOW_COPY_AND_ASSIGN(Picture); | 144 DISALLOW_COPY_AND_ASSIGN(Picture); |
146 }; | 145 }; |
147 | 146 |
148 } // namespace cc | 147 } // namespace cc |
149 | 148 |
150 #endif // CC_RESOURCES_PICTURE_H_ | 149 #endif // CC_RESOURCES_PICTURE_H_ |
OLD | NEW |