Title: [173487] branches/safari-600.1.4.11-branch/Source/WebCore
- Revision
- 173487
- Author
- [email protected]
- Date
- 2014-09-10 14:40:27 -0700 (Wed, 10 Sep 2014)
Log Message
Merged r173345. <rdar://problem/17457013>
Modified Paths
Diff
Modified: branches/safari-600.1.4.11-branch/Source/WebCore/ChangeLog (173486 => 173487)
--- branches/safari-600.1.4.11-branch/Source/WebCore/ChangeLog 2014-09-10 21:38:56 UTC (rev 173486)
+++ branches/safari-600.1.4.11-branch/Source/WebCore/ChangeLog 2014-09-10 21:40:27 UTC (rev 173487)
@@ -1,3 +1,21 @@
+2014-09-10 Babak Shafiei <[email protected]>
+
+ Merge r173345.
+
+ 2014-09-05 Tim Horton <[email protected]>
+
+ [iOS] Work around bug 136593 by disabling the PDFDocumentImage live resize optimization there
+ https://bugs.webkit.org/show_bug.cgi?id=136594
+ rdar://problem/17457013
+
+ Reviewed by Simon Fraser.
+
+ * platform/graphics/cg/PDFDocumentImage.cpp:
+ (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
+ Disable the optimization on iOS, because bug 136593 rears its head
+ most often on iOS because it is more common to have contexts that always
+ use low-quality image interpolation on that platform.
+
2014-09-08 Babak Shafiei <[email protected]>
Merge r173344.
Modified: branches/safari-600.1.4.11-branch/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp (173486 => 173487)
--- branches/safari-600.1.4.11-branch/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp 2014-09-10 21:38:56 UTC (rev 173486)
+++ branches/safari-600.1.4.11-branch/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp 2014-09-10 21:40:27 UTC (rev 173487)
@@ -144,12 +144,21 @@
void PDFDocumentImage::updateCachedImageIfNeeded(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect)
{
+#if PLATFORM(IOS)
+ // On iOS, some clients use low-quality image interpolation always, which throws off this optimization,
+ // as we never get the subsequent high-quality paint. Since live resize is rare on iOS, disable the optimization.
+ // FIXME (136593): It's also possible to do the wrong thing here if CSS specifies low-quality interpolation via the "image-rendering"
+ // property, on all platforms. We should only do this optimization if we're actually in a ImageQualityController live resize,
+ // and are guaranteed to do a high-quality paint later.
+ bool repaintIfNecessary = true;
+#else
// If we have an existing image, reuse it if we're doing a low-quality paint, even if cache parameters don't match;
// we'll rerender when we do the subsequent high-quality paint.
InterpolationQuality interpolationQuality = context->imageInterpolationQuality();
- bool useLowQualityInterpolation = interpolationQuality == InterpolationNone || interpolationQuality == InterpolationLow;
+ bool repaintIfNecessary = interpolationQuality != InterpolationNone && interpolationQuality != InterpolationLow;
+#endif
- if (!m_cachedImageBuffer || (!cacheParametersMatch(context, dstRect, srcRect) && !useLowQualityInterpolation)) {
+ if (!m_cachedImageBuffer || (!cacheParametersMatch(context, dstRect, srcRect) && repaintIfNecessary)) {
m_cachedImageBuffer = context->createCompatibleBuffer(FloatRect(enclosingIntRect(dstRect)).size());
if (!m_cachedImageBuffer)
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes