| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "cc/base/cc_export.h" | 14 #include "cc/base/cc_export.h" |
| 15 #include "cc/debug/rendering_stats_instrumentation.h" | 15 #include "cc/debug/rendering_stats_instrumentation.h" |
| 16 #include "cc/playback/image_id.h" |
| 16 #include "cc/playback/recording_source.h" | 17 #include "cc/playback/recording_source.h" |
| 17 #include "skia/ext/analysis_canvas.h" | 18 #include "skia/ext/analysis_canvas.h" |
| 18 #include "third_party/skia/include/core/SkPicture.h" | 19 #include "third_party/skia/include/core/SkPicture.h" |
| 19 | 20 |
| 20 namespace gfx { | 21 namespace gfx { |
| 21 class ColorSpace; | 22 class ColorSpace; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace cc { | 25 namespace cc { |
| 25 class DisplayItemList; | 26 class DisplayItemList; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // Return true iff this raster source can raster the given rect in layer | 101 // Return true iff this raster source can raster the given rect in layer |
| 101 // space. | 102 // space. |
| 102 bool CoversRect(const gfx::Rect& layer_rect) const; | 103 bool CoversRect(const gfx::Rect& layer_rect) const; |
| 103 | 104 |
| 104 // Returns true if this raster source has anything to rasterize. | 105 // Returns true if this raster source has anything to rasterize. |
| 105 virtual bool HasRecordings() const; | 106 virtual bool HasRecordings() const; |
| 106 | 107 |
| 107 // 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. |
| 108 virtual gfx::Rect RecordedViewport() const; | 109 virtual gfx::Rect RecordedViewport() const; |
| 109 | 110 |
| 111 gfx::Rect GetRectForImage(ImageId image_id) const; |
| 112 |
| 110 // Tracing functionality. | 113 // Tracing functionality. |
| 111 virtual void DidBeginTracing(); | 114 virtual void DidBeginTracing(); |
| 112 virtual void AsValueInto(base::trace_event::TracedValue* array) const; | 115 virtual void AsValueInto(base::trace_event::TracedValue* array) const; |
| 113 virtual sk_sp<SkPicture> GetFlattenedPicture(); | 116 virtual sk_sp<SkPicture> GetFlattenedPicture(); |
| 114 virtual size_t GetPictureMemoryUsage() const; | 117 virtual size_t GetPictureMemoryUsage() const; |
| 115 | 118 |
| 116 // 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. |
| 117 virtual bool CanUseLCDText() const; | 120 virtual bool CanUseLCDText() const; |
| 118 | 121 |
| 119 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const; | 122 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; | 157 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; |
| 155 | 158 |
| 156 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; | 159 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; |
| 157 | 160 |
| 158 DISALLOW_COPY_AND_ASSIGN(RasterSource); | 161 DISALLOW_COPY_AND_ASSIGN(RasterSource); |
| 159 }; | 162 }; |
| 160 | 163 |
| 161 } // namespace cc | 164 } // namespace cc |
| 162 | 165 |
| 163 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ | 166 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ |
| OLD | NEW |