| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 // Valid rectangle in which everything is recorded and can be rastered from. | 108 // Valid rectangle in which everything is recorded and can be rastered from. |
| 109 virtual gfx::Rect RecordedViewport() const; | 109 virtual gfx::Rect RecordedViewport() const; |
| 110 | 110 |
| 111 gfx::Rect GetRectForImage(ImageId image_id) const; | 111 gfx::Rect GetRectForImage(ImageId image_id) const; |
| 112 | 112 |
| 113 // Tracing functionality. | 113 // Tracing functionality. |
| 114 virtual void DidBeginTracing(); | 114 virtual void DidBeginTracing(); |
| 115 virtual void AsValueInto(base::trace_event::TracedValue* array) const; | 115 virtual void AsValueInto(base::trace_event::TracedValue* array) const; |
| 116 virtual sk_sp<SkPicture> GetFlattenedPicture(); | 116 virtual sk_sp<SkPicture> GetFlattenedPicture(); |
| 117 virtual size_t GetPictureMemoryUsage() const; | 117 virtual size_t GetMemoryUsage() const; |
| 118 | 118 |
| 119 // Return true if LCD anti-aliasing may be used when rastering text. | 119 // Return true if LCD anti-aliasing may be used when rastering text. |
| 120 virtual bool CanUseLCDText() const; | 120 virtual bool CanUseLCDText() const; |
| 121 | 121 |
| 122 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const; | 122 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const; |
| 123 | 123 |
| 124 // Image decode controller should be set once. Its lifetime has to exceed that | 124 // Image decode controller should be set once. Its lifetime has to exceed that |
| 125 // of the raster source, since the raster source will access it during raster. | 125 // of the raster source, since the raster source will access it during raster. |
| 126 void set_image_decode_cache(ImageDecodeCache* image_decode_cache) { | 126 void set_image_decode_cache(ImageDecodeCache* image_decode_cache) { |
| 127 DCHECK(image_decode_cache); | 127 DCHECK(image_decode_cache); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 157 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; | 157 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; |
| 158 | 158 |
| 159 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; | 159 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; |
| 160 | 160 |
| 161 DISALLOW_COPY_AND_ASSIGN(RasterSource); | 161 DISALLOW_COPY_AND_ASSIGN(RasterSource); |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 } // namespace cc | 164 } // namespace cc |
| 165 | 165 |
| 166 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ | 166 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ |
| OLD | NEW |