| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 { | 813 { |
| 814 InterpolationQuality resampling; | 814 InterpolationQuality resampling; |
| 815 if (printing()) { | 815 if (printing()) { |
| 816 resampling = InterpolationNone; | 816 resampling = InterpolationNone; |
| 817 } else if (image->currentFrameIsLazyDecoded()) { | 817 } else if (image->currentFrameIsLazyDecoded()) { |
| 818 resampling = InterpolationHigh; | 818 resampling = InterpolationHigh; |
| 819 } else { | 819 } else { |
| 820 resampling = computeInterpolationQuality( | 820 resampling = computeInterpolationQuality( |
| 821 SkScalarToFloat(src.width()), SkScalarToFloat(src.height()), | 821 SkScalarToFloat(src.width()), SkScalarToFloat(src.height()), |
| 822 SkScalarToFloat(dest.width()), SkScalarToFloat(dest.height()), | 822 SkScalarToFloat(dest.width()), SkScalarToFloat(dest.height()), |
| 823 image->currentFrameIsComplete()); | 823 image->currentFrameIsFullyReceived()); |
| 824 | 824 |
| 825 if (resampling == InterpolationNone) { | 825 if (resampling == InterpolationNone) { |
| 826 // FIXME: This is to not break tests (it results in the filter bitma
p flag | 826 // FIXME: This is to not break tests (it results in the filter bitma
p flag |
| 827 // being set to true). We need to decide if we respect Interpolation
None | 827 // being set to true). We need to decide if we respect Interpolation
None |
| 828 // being returned from computeInterpolationQuality. | 828 // being returned from computeInterpolationQuality. |
| 829 resampling = InterpolationLow; | 829 resampling = InterpolationLow; |
| 830 } | 830 } |
| 831 } | 831 } |
| 832 return static_cast<SkFilterQuality>(limitInterpolationQuality(*this, resampl
ing)); | 832 return static_cast<SkFilterQuality>(limitInterpolationQuality(*this, resampl
ing)); |
| 833 } | 833 } |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 static const SkPMColor colors[] = { | 1354 static const SkPMColor colors[] = { |
| 1355 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red | 1355 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red |
| 1356 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray | 1356 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray |
| 1357 }; | 1357 }; |
| 1358 | 1358 |
| 1359 return colors[index]; | 1359 return colors[index]; |
| 1360 } | 1360 } |
| 1361 #endif | 1361 #endif |
| 1362 | 1362 |
| 1363 } // namespace blink | 1363 } // namespace blink |
| OLD | NEW |