| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  117             } |  117             } | 
|  118         } |  118         } | 
|  119         it->key->repaint(); |  119         it->key->repaint(); | 
|  120     } |  120     } | 
|  121  |  121  | 
|  122     m_liveResizeOptimizationIsActive = false; |  122     m_liveResizeOptimizationIsActive = false; | 
|  123 } |  123 } | 
|  124  |  124  | 
|  125 void ImageQualityController::restartTimer() |  125 void ImageQualityController::restartTimer() | 
|  126 { |  126 { | 
|  127     m_timer.startOneShot(cLowQualityTimeThreshold); |  127     m_timer.startOneShot(cLowQualityTimeThreshold, FROM_HERE); | 
|  128 } |  128 } | 
|  129  |  129  | 
|  130 bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, R
     enderObject* object, Image* image, const void *layer, const LayoutSize& layoutSi
     ze) |  130 bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, R
     enderObject* object, Image* image, const void *layer, const LayoutSize& layoutSi
     ze) | 
|  131 { |  131 { | 
|  132     // If the image is not a bitmap image, then none of this is relevant and we 
     just paint at high |  132     // If the image is not a bitmap image, then none of this is relevant and we 
     just paint at high | 
|  133     // quality. |  133     // quality. | 
|  134     if (!image || !image->isBitmapImage() || context->paintingDisabled()) |  134     if (!image || !image->isBitmapImage() || context->paintingDisabled()) | 
|  135         return false; |  135         return false; | 
|  136  |  136  | 
|  137     if (object->style()->imageRendering() == ImageRenderingOptimizeContrast) |  137     if (object->style()->imageRendering() == ImageRenderingOptimizeContrast) | 
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  207     // This object has been resized to two different sizes while the timer |  207     // This object has been resized to two different sizes while the timer | 
|  208     // is active, so draw at low quality, set the flag for animated resizes and |  208     // is active, so draw at low quality, set the flag for animated resizes and | 
|  209     // the object to the list for high quality redraw. |  209     // the object to the list for high quality redraw. | 
|  210     set(object, innerMap, layer, scaledLayoutSize); |  210     set(object, innerMap, layer, scaledLayoutSize); | 
|  211     m_animatedResizeIsActive = true; |  211     m_animatedResizeIsActive = true; | 
|  212     restartTimer(); |  212     restartTimer(); | 
|  213     return true; |  213     return true; | 
|  214 } |  214 } | 
|  215  |  215  | 
|  216 } // namespace WebCore |  216 } // namespace WebCore | 
| OLD | NEW |