| OLD | NEW |
| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 m_liveResizeOptimizationIsActive = true; | 197 m_liveResizeOptimizationIsActive = true; |
| 198 return true; | 198 return true; |
| 199 } | 199 } |
| 200 if (m_liveResizeOptimizationIsActive) { | 200 if (m_liveResizeOptimizationIsActive) { |
| 201 // Live resize has ended, paint in HQ and remove this object from th
e list. | 201 // Live resize has ended, paint in HQ and remove this object from th
e list. |
| 202 removeLayer(object, innerMap, layer); | 202 removeLayer(object, innerMap, layer); |
| 203 return false; | 203 return false; |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 | 206 |
| 207 if (layoutSize == image->size()) { | 207 if (layoutSize == image->defaultConcreteObjectSize()) { |
| 208 // There is no scale in effect. If we had a scale in effect before, we c
an just remove this object from the list. | 208 // There is no scale in effect. If we had a scale in effect before, we c
an just remove this object from the list. |
| 209 removeLayer(object, innerMap, layer); | 209 removeLayer(object, innerMap, layer); |
| 210 return false; | 210 return false; |
| 211 } | 211 } |
| 212 | 212 |
| 213 // If an animated resize is active for this object, paint in low quality and
kick the timer ahead. | 213 // If an animated resize is active for this object, paint in low quality and
kick the timer ahead. |
| 214 if (objectIsResizing) { | 214 if (objectIsResizing) { |
| 215 bool sizesChanged = oldSize != layoutSize; | 215 bool sizesChanged = oldSize != layoutSize; |
| 216 set(object, innerMap, layer, layoutSize, sizesChanged); | 216 set(object, innerMap, layer, layoutSize, sizesChanged); |
| 217 if (sizesChanged) | 217 if (sizesChanged) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 234 } | 234 } |
| 235 // This object has been resized to two different sizes while the timer | 235 // This object has been resized to two different sizes while the timer |
| 236 // is active, so draw at low quality, set the flag for animated resizes and | 236 // is active, so draw at low quality, set the flag for animated resizes and |
| 237 // the object to the list for high quality redraw. | 237 // the object to the list for high quality redraw. |
| 238 set(object, innerMap, layer, layoutSize, true); | 238 set(object, innerMap, layer, layoutSize, true); |
| 239 restartTimer(); | 239 restartTimer(); |
| 240 return true; | 240 return true; |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace blink | 243 } // namespace blink |
| OLD | NEW |