Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 1962563002: Fix ImageDecoder::frameIsCompleteAtIndex - fully received instead of decoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PNG alpha & partial decode fixes. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 { 811 {
812 InterpolationQuality resampling; 812 InterpolationQuality resampling;
813 if (printing()) { 813 if (printing()) {
814 resampling = InterpolationNone; 814 resampling = InterpolationNone;
815 } else if (image->currentFrameIsLazyDecoded()) { 815 } else if (image->currentFrameIsLazyDecoded()) {
816 resampling = InterpolationHigh; 816 resampling = InterpolationHigh;
817 } else { 817 } else {
818 resampling = computeInterpolationQuality( 818 resampling = computeInterpolationQuality(
819 SkScalarToFloat(src.width()), SkScalarToFloat(src.height()), 819 SkScalarToFloat(src.width()), SkScalarToFloat(src.height()),
820 SkScalarToFloat(dest.width()), SkScalarToFloat(dest.height()), 820 SkScalarToFloat(dest.width()), SkScalarToFloat(dest.height()),
821 image->currentFrameIsComplete()); 821 image->currentFrameIsFullyReceived());
822 822
823 if (resampling == InterpolationNone) { 823 if (resampling == InterpolationNone) {
824 // FIXME: This is to not break tests (it results in the filter bitma p flag 824 // FIXME: This is to not break tests (it results in the filter bitma p flag
825 // being set to true). We need to decide if we respect Interpolation None 825 // being set to true). We need to decide if we respect Interpolation None
826 // being returned from computeInterpolationQuality. 826 // being returned from computeInterpolationQuality.
827 resampling = InterpolationLow; 827 resampling = InterpolationLow;
828 } 828 }
829 } 829 }
830 return static_cast<SkFilterQuality>(limitInterpolationQuality(*this, resampl ing)); 830 return static_cast<SkFilterQuality>(limitInterpolationQuality(*this, resampl ing));
831 } 831 }
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 static const SkPMColor colors[] = { 1359 static const SkPMColor colors[] = {
1360 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red 1360 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red
1361 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray 1361 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray
1362 }; 1362 };
1363 1363
1364 return colors[index]; 1364 return colors[index];
1365 } 1365 }
1366 #endif 1366 #endif
1367 1367
1368 } // namespace blink 1368 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698