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

Side by Side Diff: Source/core/rendering/ImageQualityController.cpp

Issue 323013004: Clean up transform methods in GraphicsContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2nd Attempt Mac build fix Created 6 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
« no previous file with comments | « Source/core/page/PrintContext.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 m_liveResizeOptimizationIsActive = true; 182 m_liveResizeOptimizationIsActive = true;
183 return true; 183 return true;
184 } 184 }
185 if (m_liveResizeOptimizationIsActive) { 185 if (m_liveResizeOptimizationIsActive) {
186 // Live resize has ended, paint in HQ and remove this object from th e list. 186 // Live resize has ended, paint in HQ and remove this object from th e list.
187 removeLayer(object, innerMap, layer); 187 removeLayer(object, innerMap, layer);
188 return false; 188 return false;
189 } 189 }
190 } 190 }
191 191
192 // See crbug.com/382491. This test is insufficient to ensure that there is n o scale
193 // applied in the compositor, but it is probably adequate here. In the worst case we
194 // draw at high quality when we need not.
192 if (!contextIsScaled && scaledLayoutSize == scaledImageSize) { 195 if (!contextIsScaled && scaledLayoutSize == scaledImageSize) {
193 // There is no scale in effect. If we had a scale in effect before, we c an just remove this object from the list. 196 // There is no scale in effect. If we had a scale in effect before, we c an just remove this object from the list.
194 removeLayer(object, innerMap, layer); 197 removeLayer(object, innerMap, layer);
195 return false; 198 return false;
196 } 199 }
197 200
198 // If an animated resize is active, paint in low quality and kick the timer ahead. 201 // If an animated resize is active, paint in low quality and kick the timer ahead.
199 if (m_animatedResizeIsActive) { 202 if (m_animatedResizeIsActive) {
200 set(object, innerMap, layer, scaledLayoutSize); 203 set(object, innerMap, layer, scaledLayoutSize);
201 restartTimer(); 204 restartTimer();
(...skipping 16 matching lines...) Expand all
218 // This object has been resized to two different sizes while the timer 221 // This object has been resized to two different sizes while the timer
219 // is active, so draw at low quality, set the flag for animated resizes and 222 // is active, so draw at low quality, set the flag for animated resizes and
220 // the object to the list for high quality redraw. 223 // the object to the list for high quality redraw.
221 set(object, innerMap, layer, scaledLayoutSize); 224 set(object, innerMap, layer, scaledLayoutSize);
222 m_animatedResizeIsActive = true; 225 m_animatedResizeIsActive = true;
223 restartTimer(); 226 restartTimer();
224 return true; 227 return true;
225 } 228 }
226 229
227 } // namespace WebCore 230 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/PrintContext.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698