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

Side by Side Diff: third_party/WebKit/Source/core/layout/ImageQualityController.cpp

Issue 2922483004: Generate enum/getters/setters/mappings for image-rendering. (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 const LayoutSize& layout_size, 172 const LayoutSize& layout_size,
173 double last_frame_time_monotonic) { 173 double last_frame_time_monotonic) {
174 // If the image is not a bitmap image, then none of this is relevant and we 174 // If the image is not a bitmap image, then none of this is relevant and we
175 // just paint at high quality. 175 // just paint at high quality.
176 if (!image || !image->IsBitmapImage()) 176 if (!image || !image->IsBitmapImage())
177 return false; 177 return false;
178 178
179 if (!layer) 179 if (!layer)
180 return false; 180 return false;
181 181
182 if (object.Style()->ImageRendering() == EImageRendering::kOptimizeContrast) 182 if (object.Style()->ImageRendering() ==
183 EImageRendering::kWebkitOptimizeContrast)
183 return true; 184 return true;
184 185
185 if (LocalFrame* frame = object.GetFrame()) { 186 if (LocalFrame* frame = object.GetFrame()) {
186 if (frame->GetSettings() && 187 if (frame->GetSettings() &&
187 frame->GetSettings()->GetUseDefaultImageInterpolationQuality()) 188 frame->GetSettings()->GetUseDefaultImageInterpolationQuality())
188 return false; 189 return false;
189 } 190 }
190 191
191 // Look ourselves up in the hashtables. 192 // Look ourselves up in the hashtables.
192 ObjectLayerSizeMap::iterator i = object_layer_size_map_.find(&object); 193 ObjectLayerSizeMap::iterator i = object_layer_size_map_.find(&object);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 239 }
239 // This object has been resized to two different sizes while the timer 240 // This object has been resized to two different sizes while the timer
240 // is active, so draw at low quality, set the flag for animated resizes and 241 // is active, so draw at low quality, set the flag for animated resizes and
241 // the object to the list for high quality redraw. 242 // the object to the list for high quality redraw.
242 Set(object, inner_map, layer, layout_size, true); 243 Set(object, inner_map, layer, layout_size, true);
243 RestartTimer(last_frame_time_monotonic); 244 RestartTimer(last_frame_time_monotonic);
244 return true; 245 return true;
245 } 246 }
246 247
247 } // namespace blink 248 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.json5 ('k') | third_party/WebKit/Source/core/paint/HTMLCanvasPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698