| 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_DISPLAY_LIST_RASTER_SOURCE_H_ | 5 #ifndef CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ |
| 6 #define CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ | 6 #define CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 scoped_refptr<DisplayListRasterSource> CreateCloneWithoutLCDText() const; | 111 scoped_refptr<DisplayListRasterSource> CreateCloneWithoutLCDText() const; |
| 112 | 112 |
| 113 // Image decode controller should be set once. Its lifetime has to exceed that | 113 // Image decode controller should be set once. Its lifetime has to exceed that |
| 114 // of the raster source, since the raster source will access it during raster. | 114 // of the raster source, since the raster source will access it during raster. |
| 115 void SetImageDecodeController(ImageDecodeController* image_decode_controller); | 115 void SetImageDecodeController(ImageDecodeController* image_decode_controller); |
| 116 | 116 |
| 117 // base::trace_event::MemoryDumpProvider implementation | 117 // base::trace_event::MemoryDumpProvider implementation |
| 118 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, | 118 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| 119 base::trace_event::ProcessMemoryDump* pmd) override; | 119 base::trace_event::ProcessMemoryDump* pmd) override; |
| 120 | 120 |
| 121 enum class ImageScalingOptimization { |
| 122 Animation, // Optimize for smooth/continuous transitions. |
| 123 Static, // Optimize for high-quality static content. |
| 124 }; |
| 125 void SetImageScalingOptimization(ImageScalingOptimization); |
| 126 |
| 121 protected: | 127 protected: |
| 122 friend class base::RefCountedThreadSafe<DisplayListRasterSource>; | 128 friend class base::RefCountedThreadSafe<DisplayListRasterSource>; |
| 123 | 129 |
| 124 DisplayListRasterSource(const DisplayListRecordingSource* other, | 130 DisplayListRasterSource(const DisplayListRecordingSource* other, |
| 125 bool can_use_lcd_text); | 131 bool can_use_lcd_text); |
| 126 DisplayListRasterSource(const DisplayListRasterSource* other, | 132 DisplayListRasterSource(const DisplayListRasterSource* other, |
| 127 bool can_use_lcd_text); | 133 bool can_use_lcd_text); |
| 128 ~DisplayListRasterSource() override; | 134 ~DisplayListRasterSource() override; |
| 129 | 135 |
| 130 // These members are const as this raster source may be in use on another | 136 // These members are const as this raster source may be in use on another |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 float contents_scale) const; | 168 float contents_scale) const; |
| 163 | 169 |
| 164 void PrepareForPlaybackToCanvas(SkCanvas* canvas, | 170 void PrepareForPlaybackToCanvas(SkCanvas* canvas, |
| 165 const gfx::Rect& canvas_bitmap_rect, | 171 const gfx::Rect& canvas_bitmap_rect, |
| 166 const gfx::Rect& canvas_playback_rect, | 172 const gfx::Rect& canvas_playback_rect, |
| 167 float contents_scale) const; | 173 float contents_scale) const; |
| 168 | 174 |
| 169 // Used to ensure that memory dump logic always happens on the same thread. | 175 // Used to ensure that memory dump logic always happens on the same thread. |
| 170 base::ThreadChecker memory_dump_thread_checker_; | 176 base::ThreadChecker memory_dump_thread_checker_; |
| 171 | 177 |
| 178 ImageScalingOptimization image_scaling_optimization_; |
| 179 |
| 172 DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource); | 180 DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource); |
| 173 }; | 181 }; |
| 174 | 182 |
| 175 } // namespace cc | 183 } // namespace cc |
| 176 | 184 |
| 177 #endif // CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ | 185 #endif // CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ |
| OLD | NEW |