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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 | 111 |
| 112 // Return true if LCD anti-aliasing may be used when rastering text. | 112 // Return true if LCD anti-aliasing may be used when rastering text. |
| 113 virtual bool CanUseLCDText() const; | 113 virtual bool CanUseLCDText() const; |
| 114 | 114 |
| 115 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const; | 115 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const; |
| 116 | 116 |
| 117 // Image decode controller should be set once. Its lifetime has to exceed that | 117 // Image decode controller should be set once. Its lifetime has to exceed that |
| 118 // of the raster source, since the raster source will access it during raster. | 118 // of the raster source, since the raster source will access it during raster. |
| 119 void SetImageDecodeController(ImageDecodeController* image_decode_controller); | 119 void SetImageDecodeController(ImageDecodeController* image_decode_controller); |
| 120 | 120 |
| 121 // Returns the ImageDecodeController, currently only used by | |
| 122 // GpuRasterBufferProvider in order | |
|
vmpstr
2016/07/14 21:41:54
nit: can you reformat the comment?
ericrk
2016/07/14 22:04:20
Done.
| |
| 123 // to create its own ImageHijackCanvas. Because of the MultiPictureDraw | |
| 124 // approach used by | |
| 125 // GPU raster, it does not integrate well with the use of the | |
| 126 // ImageHijackCanvas internal | |
| 127 // to this class. See gpu_raster_buffer_provider.cc for more information. | |
|
vmpstr
2016/07/14 21:41:54
Can you file a bug and
TODO(crbug.com/######): R
ericrk
2016/07/14 22:04:20
Done.
| |
| 128 ImageDecodeController* GetImageDecodeController() const; | |
| 129 | |
| 121 protected: | 130 protected: |
| 122 friend class base::RefCountedThreadSafe<RasterSource>; | 131 friend class base::RefCountedThreadSafe<RasterSource>; |
| 123 | 132 |
| 124 RasterSource(const RecordingSource* other, bool can_use_lcd_text); | 133 RasterSource(const RecordingSource* other, bool can_use_lcd_text); |
| 125 RasterSource(const RasterSource* other, bool can_use_lcd_text); | 134 RasterSource(const RasterSource* other, bool can_use_lcd_text); |
| 126 virtual ~RasterSource(); | 135 virtual ~RasterSource(); |
| 127 | 136 |
| 128 // These members are const as this raster source may be in use on another | 137 // These members are const as this raster source may be in use on another |
| 129 // thread and so should not be touched after construction. | 138 // thread and so should not be touched after construction. |
| 130 const scoped_refptr<DisplayItemList> display_list_; | 139 const scoped_refptr<DisplayItemList> display_list_; |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 150 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; | 159 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; |
| 151 | 160 |
| 152 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; | 161 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; |
| 153 | 162 |
| 154 DISALLOW_COPY_AND_ASSIGN(RasterSource); | 163 DISALLOW_COPY_AND_ASSIGN(RasterSource); |
| 155 }; | 164 }; |
| 156 | 165 |
| 157 } // namespace cc | 166 } // namespace cc |
| 158 | 167 |
| 159 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ | 168 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ |
| OLD | NEW |