Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Side by Side Diff: cc/playback/display_list_raster_source.h

Issue 1839143004: Limit image filtering during scale animations Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698