Chromium Code Reviews| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 gImageQualityController->objectDestroyed(renderer); | 55 gImageQualityController->objectDestroyed(renderer); |
| 56 if (gImageQualityController->isEmpty()) { | 56 if (gImageQualityController->isEmpty()) { |
| 57 delete gImageQualityController; | 57 delete gImageQualityController; |
| 58 gImageQualityController = 0; | 58 gImageQualityController = 0; |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 InterpolationQuality ImageQualityController::chooseInterpolationQuality(Graphics Context* context, RenderObject* object, Image* image, const void* layer, const L ayoutSize& layoutSize) | 63 InterpolationQuality ImageQualityController::chooseInterpolationQuality(Graphics Context* context, RenderObject* object, Image* image, const void* layer, const L ayoutSize& layoutSize) |
| 64 { | 64 { |
| 65 if (object->style()->imageRendering() == ImageRenderingPixelated) { | |
|
pdr.
2014/06/13 03:21:14
Nit: no need for the curly braces.
jackhou
2014/06/13 03:33:19
Done.
| |
| 66 return InterpolationNone; | |
| 67 } | |
| 68 | |
| 65 if (InterpolationDefault == InterpolationLow) | 69 if (InterpolationDefault == InterpolationLow) |
| 66 return InterpolationLow; | 70 return InterpolationLow; |
| 67 | 71 |
| 68 if (shouldPaintAtLowQuality(context, object, image, layer, layoutSize)) | 72 if (shouldPaintAtLowQuality(context, object, image, layer, layoutSize)) |
| 69 return InterpolationLow; | 73 return InterpolationLow; |
| 70 | 74 |
| 71 // For images that are potentially animated we paint them at medium quality. | 75 // For images that are potentially animated we paint them at medium quality. |
| 72 if (image && image->maybeAnimated()) | 76 if (image && image->maybeAnimated()) |
| 73 return InterpolationMedium; | 77 return InterpolationMedium; |
| 74 | 78 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 221 // This object has been resized to two different sizes while the timer | 225 // This object has been resized to two different sizes while the timer |
| 222 // is active, so draw at low quality, set the flag for animated resizes and | 226 // is active, so draw at low quality, set the flag for animated resizes and |
| 223 // the object to the list for high quality redraw. | 227 // the object to the list for high quality redraw. |
| 224 set(object, innerMap, layer, scaledLayoutSize); | 228 set(object, innerMap, layer, scaledLayoutSize); |
| 225 m_animatedResizeIsActive = true; | 229 m_animatedResizeIsActive = true; |
| 226 restartTimer(); | 230 restartTimer(); |
| 227 return true; | 231 return true; |
| 228 } | 232 } |
| 229 | 233 |
| 230 } // namespace WebCore | 234 } // namespace WebCore |
| OLD | NEW |