| 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 { | 812 { |
| 813 InterpolationQuality resampling; | 813 InterpolationQuality resampling; |
| 814 if (printing()) { | 814 if (printing()) { |
| 815 resampling = InterpolationNone; | 815 resampling = InterpolationNone; |
| 816 } else if (image->currentFrameIsLazyDecoded()) { | 816 } else if (image->currentFrameIsLazyDecoded()) { |
| 817 resampling = InterpolationHigh; | 817 resampling = InterpolationHigh; |
| 818 } else { | 818 } else { |
| 819 resampling = computeInterpolationQuality( | 819 resampling = computeInterpolationQuality( |
| 820 SkScalarToFloat(src.width()), SkScalarToFloat(src.height()), | 820 SkScalarToFloat(src.width()), SkScalarToFloat(src.height()), |
| 821 SkScalarToFloat(dest.width()), SkScalarToFloat(dest.height()), | 821 SkScalarToFloat(dest.width()), SkScalarToFloat(dest.height()), |
| 822 image->currentFrameIsComplete()); | 822 image->currentFrameIsFullyReceived()); |
| 823 | 823 |
| 824 if (resampling == InterpolationNone) { | 824 if (resampling == InterpolationNone) { |
| 825 // FIXME: This is to not break tests (it results in the filter bitma
p flag | 825 // FIXME: This is to not break tests (it results in the filter bitma
p flag |
| 826 // being set to true). We need to decide if we respect Interpolation
None | 826 // being set to true). We need to decide if we respect Interpolation
None |
| 827 // being returned from computeInterpolationQuality. | 827 // being returned from computeInterpolationQuality. |
| 828 resampling = InterpolationLow; | 828 resampling = InterpolationLow; |
| 829 } | 829 } |
| 830 } | 830 } |
| 831 return static_cast<SkFilterQuality>(limitInterpolationQuality(*this, resampl
ing)); | 831 return static_cast<SkFilterQuality>(limitInterpolationQuality(*this, resampl
ing)); |
| 832 } | 832 } |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 static const SkPMColor colors[] = { | 1330 static const SkPMColor colors[] = { |
| 1331 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red | 1331 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red |
| 1332 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray | 1332 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray |
| 1333 }; | 1333 }; |
| 1334 | 1334 |
| 1335 return colors[index]; | 1335 return colors[index]; |
| 1336 } | 1336 } |
| 1337 #endif | 1337 #endif |
| 1338 | 1338 |
| 1339 } // namespace blink | 1339 } // namespace blink |
| OLD | NEW |