OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RASTER_RASTER_SOURCE_H_ | 5 #ifndef CC_RASTER_RASTER_SOURCE_H_ |
6 #define CC_RASTER_RASTER_SOURCE_H_ | 6 #define CC_RASTER_RASTER_SOURCE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 const size_t painter_reported_memory_usage_; | 152 const size_t painter_reported_memory_usage_; |
153 const SkColor background_color_; | 153 const SkColor background_color_; |
154 const bool requires_clear_; | 154 const bool requires_clear_; |
155 const bool can_use_lcd_text_; | 155 const bool can_use_lcd_text_; |
156 const bool is_solid_color_; | 156 const bool is_solid_color_; |
157 const SkColor solid_color_; | 157 const SkColor solid_color_; |
158 const gfx::Rect recorded_viewport_; | 158 const gfx::Rect recorded_viewport_; |
159 const gfx::Size size_; | 159 const gfx::Size size_; |
160 const bool clear_canvas_with_debug_color_; | 160 const bool clear_canvas_with_debug_color_; |
161 const int slow_down_raster_scale_factor_for_debug_; | 161 const int slow_down_raster_scale_factor_for_debug_; |
| 162 const float recording_scale_factor_; |
162 | 163 |
163 // In practice, this is only set once before raster begins, so it's ok with | 164 // In practice, this is only set once before raster begins, so it's ok with |
164 // respect to threading. | 165 // respect to threading. |
165 ImageDecodeCache* image_decode_cache_; | 166 ImageDecodeCache* image_decode_cache_; |
166 | 167 |
167 private: | 168 private: |
168 void RasterCommon(SkCanvas* canvas, | 169 void RasterCommon(SkCanvas* canvas, |
169 SkPicture::AbortCallback* callback = nullptr) const; | 170 SkPicture::AbortCallback* callback = nullptr) const; |
170 | 171 |
171 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; | 172 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; |
172 | 173 |
173 DISALLOW_COPY_AND_ASSIGN(RasterSource); | 174 DISALLOW_COPY_AND_ASSIGN(RasterSource); |
174 }; | 175 }; |
175 | 176 |
176 } // namespace cc | 177 } // namespace cc |
177 | 178 |
178 #endif // CC_RASTER_RASTER_SOURCE_H_ | 179 #endif // CC_RASTER_RASTER_SOURCE_H_ |
OLD | NEW |