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_PLAYBACK_PICTURE_PILE_IMPL_H_ | 5 #ifndef CC_PLAYBACK_PICTURE_PILE_IMPL_H_ |
6 #define CC_PLAYBACK_PICTURE_PILE_IMPL_H_ | 6 #define CC_PLAYBACK_PICTURE_PILE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // TODO(enne/vmiura): this has a read/write race between raster and compositor | 123 // TODO(enne/vmiura): this has a read/write race between raster and compositor |
124 // threads with multi-threaded Ganesh. Make this const or remove it. | 124 // threads with multi-threaded Ganesh. Make this const or remove it. |
125 bool should_attempt_to_use_distance_field_text_; | 125 bool should_attempt_to_use_distance_field_text_; |
126 | 126 |
127 size_t picture_memory_usage_; | 127 size_t picture_memory_usage_; |
128 | 128 |
129 private: | 129 private: |
130 typedef std::map<const Picture*, Region> PictureRegionMap; | 130 typedef std::map<const Picture*, Region> PictureRegionMap; |
131 | 131 |
132 // Called when analyzing a tile. We can use AnalysisCanvas as | 132 // Called when analyzing a tile. We can use AnalysisCanvas as |
133 // SkDrawPictureCallback, which allows us to early out from analysis. | 133 // SkPicture::AbortCallback, which allows us to early out from analysis. |
134 void RasterForAnalysis(skia::AnalysisCanvas* canvas, | 134 void RasterForAnalysis(skia::AnalysisCanvas* canvas, |
135 const gfx::Rect& canvas_rect, | 135 const gfx::Rect& canvas_rect, |
136 float contents_scale) const; | 136 float contents_scale) const; |
137 | 137 |
138 void CoalesceRasters(const gfx::Rect& canvas_rect, | 138 void CoalesceRasters(const gfx::Rect& canvas_rect, |
139 const gfx::Rect& content_rect, | 139 const gfx::Rect& content_rect, |
140 float contents_scale, | 140 float contents_scale, |
141 PictureRegionMap* result) const; | 141 PictureRegionMap* result) const; |
142 | 142 |
143 void RasterCommon(SkCanvas* canvas, | 143 void RasterCommon(SkCanvas* canvas, |
144 SkDrawPictureCallback* callback, | 144 SkPicture::AbortCallback* callback, |
145 const gfx::Rect& canvas_rect, | 145 const gfx::Rect& canvas_rect, |
146 float contents_scale) const; | 146 float contents_scale) const; |
147 | 147 |
148 // An internal CanRaster check that goes to the picture_map rather than | 148 // An internal CanRaster check that goes to the picture_map rather than |
149 // using the recorded_viewport hint. | 149 // using the recorded_viewport hint. |
150 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; | 150 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; |
151 | 151 |
152 gfx::Rect PaddedRect(const PictureMapKey& key) const; | 152 gfx::Rect PaddedRect(const PictureMapKey& key) const; |
153 | 153 |
154 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 154 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
155 }; | 155 }; |
156 | 156 |
157 } // namespace cc | 157 } // namespace cc |
158 | 158 |
159 #endif // CC_PLAYBACK_PICTURE_PILE_IMPL_H_ | 159 #endif // CC_PLAYBACK_PICTURE_PILE_IMPL_H_ |
OLD | NEW |