Chromium Code Reviews| 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_PLAYBACK_RASTER_SOURCE_H_ | 5 #ifndef CC_PLAYBACK_RASTER_SOURCE_H_ |
| 6 #define CC_PLAYBACK_RASTER_SOURCE_H_ | 6 #define CC_PLAYBACK_RASTER_SOURCE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 | 24 |
| 25 namespace cc { | 25 namespace cc { |
| 26 class DisplayItemList; | 26 class DisplayItemList; |
| 27 class DrawImage; | 27 class DrawImage; |
| 28 class ImageDecodeCache; | 28 class ImageDecodeCache; |
| 29 | 29 |
| 30 class CC_EXPORT RasterSource : public base::RefCountedThreadSafe<RasterSource> { | 30 class CC_EXPORT RasterSource : public base::RefCountedThreadSafe<RasterSource> { |
| 31 public: | 31 public: |
| 32 struct CC_EXPORT PlaybackSettings { | 32 struct CC_EXPORT PlaybackSettings { |
| 33 PlaybackSettings(); | 33 PlaybackSettings(); |
| 34 PlaybackSettings(const PlaybackSettings&); | |
| 35 ~PlaybackSettings(); | |
| 34 | 36 |
| 35 // If set to true, this indicates that the canvas has already been | 37 // If set to true, this indicates that the canvas has already been |
| 36 // rasterized into. This means that the canvas cannot be cleared safely. | 38 // rasterized into. This means that the canvas cannot be cleared safely. |
| 37 bool playback_to_shared_canvas; | 39 bool playback_to_shared_canvas; |
| 38 | 40 |
| 39 // If set to true, none of the images will be rasterized. | 41 // If set to true, none of the images will be rasterized. |
| 40 bool skip_images; | 42 bool skip_images; |
| 41 | 43 |
| 42 // If set to true, we will use an image hijack canvas, which enables | 44 // If set to true, we will use an image hijack canvas, which enables |
| 43 // compositor image caching. | 45 // compositor image caching. |
| 44 bool use_image_hijack_canvas; | 46 bool use_image_hijack_canvas; |
| 47 | |
| 48 // If non-empty, an image hijack canvas will be used to skip these images | |
| 49 // during raster. | |
| 50 std::unordered_set<ImageId> images_to_skip; | |
|
vmpstr
2017/02/03 23:42:32
Hmm this feels like a wrong place to put this. How
Khushal
2017/02/07 00:25:32
It will be a lot of plumbing. The set has to final
| |
| 45 }; | 51 }; |
| 46 | 52 |
| 47 static scoped_refptr<RasterSource> CreateFromRecordingSource( | 53 static scoped_refptr<RasterSource> CreateFromRecordingSource( |
| 48 const RecordingSource* other, | 54 const RecordingSource* other, |
| 49 bool can_use_lcd_text); | 55 bool can_use_lcd_text); |
| 50 | 56 |
| 51 // TODO(trchen): Deprecated. | 57 // TODO(trchen): Deprecated. |
| 52 void PlaybackToCanvas(SkCanvas* canvas, | 58 void PlaybackToCanvas(SkCanvas* canvas, |
| 53 const gfx::Rect& canvas_bitmap_rect, | 59 const gfx::Rect& canvas_bitmap_rect, |
| 54 const gfx::Rect& canvas_playback_rect, | 60 const gfx::Rect& canvas_playback_rect, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; | 163 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; |
| 158 | 164 |
| 159 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; | 165 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; |
| 160 | 166 |
| 161 DISALLOW_COPY_AND_ASSIGN(RasterSource); | 167 DISALLOW_COPY_AND_ASSIGN(RasterSource); |
| 162 }; | 168 }; |
| 163 | 169 |
| 164 } // namespace cc | 170 } // namespace cc |
| 165 | 171 |
| 166 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ | 172 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ |
| OLD | NEW |