| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 146 } |
| 147 // TODO(wangxianzhu): Use LayoutObject::mutableForPainting(). | 147 // TODO(wangxianzhu): Use LayoutObject::mutableForPainting(). |
| 148 const_cast<LayoutObject*>(layoutObject)->setShouldDoFullPaintInvalidatio
n(); | 148 const_cast<LayoutObject*>(layoutObject)->setShouldDoFullPaintInvalidatio
n(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 m_liveResizeOptimizationIsActive = false; | 151 m_liveResizeOptimizationIsActive = false; |
| 152 } | 152 } |
| 153 | 153 |
| 154 void ImageQualityController::restartTimer() | 154 void ImageQualityController::restartTimer() |
| 155 { | 155 { |
| 156 m_timer->startOneShot(cLowQualityTimeThreshold, FROM_HERE); | 156 m_timer->startOneShot(cLowQualityTimeThreshold, BLINK_FROM_HERE); |
| 157 } | 157 } |
| 158 | 158 |
| 159 bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, c
onst LayoutObject* object, Image* image, const void *layer, const LayoutSize& la
youtSize) | 159 bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, c
onst LayoutObject* object, Image* image, const void *layer, const LayoutSize& la
youtSize) |
| 160 { | 160 { |
| 161 // If the image is not a bitmap image, then none of this is relevant and we
just paint at high | 161 // If the image is not a bitmap image, then none of this is relevant and we
just paint at high |
| 162 // quality. | 162 // quality. |
| 163 if (!image || !image->isBitmapImage()) | 163 if (!image || !image->isBitmapImage()) |
| 164 return false; | 164 return false; |
| 165 | 165 |
| 166 if (!layer) | 166 if (!layer) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // This object has been resized to two different sizes while the timer | 229 // This object has been resized to two different sizes while the timer |
| 230 // is active, so draw at low quality, set the flag for animated resizes and | 230 // is active, so draw at low quality, set the flag for animated resizes and |
| 231 // the object to the list for high quality redraw. | 231 // the object to the list for high quality redraw. |
| 232 set(object, innerMap, layer, layoutSize); | 232 set(object, innerMap, layer, layoutSize); |
| 233 m_animatedResizeIsActive = true; | 233 m_animatedResizeIsActive = true; |
| 234 restartTimer(); | 234 restartTimer(); |
| 235 return true; | 235 return true; |
| 236 } | 236 } |
| 237 | 237 |
| 238 } // namespace blink | 238 } // namespace blink |
| OLD | NEW |