[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:53:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 90abcc9dc9c39cac99b78a7f331383e59613d1e2
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 28 22:26:00 2010 +0000
2010-09-28 W. James MacLean <wjmaclean at chromium.org>
Reviewed by James Robinson.
Scaled Resized images are blurred when sent to Skia
https://bugs.webkit.org/show_bug.cgi?id=42370
* platform/chromium-linux/svg/custom/image-rescale-expected.checksum: Added.
* platform/chromium-linux/svg/custom/image-rescale-expected.png: Added.
* platform/chromium-linux/svg/custom/image-rescale-expected.txt: Added.
* platform/chromium/test_expectations.txt:
* platform/mac/svg/custom/image-rescale-expected.checksum: Added.
* platform/mac/svg/custom/image-rescale-expected.png: Added.
* platform/mac/svg/custom/image-rescale-expected.txt: Added.
* svg/custom/image-rescale.svg: Added.
* svg/custom/resources/image-rescale.jpg: Added.
2010-09-28 W. James MacLean <wjmaclean at chromium.org>
Reviewed by James Robinson.
Scaled Resized images are blurred when sent to Skia
https://bugs.webkit.org/show_bug.cgi?id=42370
This patch modifies ImageSkia.cpp to fix the calculation of resampled
bitmap sizes so as to include the transform matrix of the canvas.
Test: svg/custom/image-rescale.svg
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::computeResamplingMode):
(WebCore::drawResampledBitmap):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8469769..3a2158d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2010-09-28 W. James MacLean <wjmaclean at chromium.org>
+
+ Reviewed by James Robinson.
+
+ Scaled Resized images are blurred when sent to Skia
+ https://bugs.webkit.org/show_bug.cgi?id=42370
+
+ * platform/chromium-linux/svg/custom/image-rescale-expected.checksum: Added.
+ * platform/chromium-linux/svg/custom/image-rescale-expected.png: Added.
+ * platform/chromium-linux/svg/custom/image-rescale-expected.txt: Added.
+ * platform/chromium/test_expectations.txt:
+ * platform/mac/svg/custom/image-rescale-expected.checksum: Added.
+ * platform/mac/svg/custom/image-rescale-expected.png: Added.
+ * platform/mac/svg/custom/image-rescale-expected.txt: Added.
+ * svg/custom/image-rescale.svg: Added.
+ * svg/custom/resources/image-rescale.jpg: Added.
+
2010-09-28 Matthew Delaney <mdelaney at apple.com>
Reviewed by Adele Peterson.
diff --git a/LayoutTests/platform/chromium-linux/svg/custom/image-rescale-expected.checksum b/LayoutTests/platform/chromium-linux/svg/custom/image-rescale-expected.checksum
new file mode 100644
index 0000000..1e7a57b
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/svg/custom/image-rescale-expected.checksum
@@ -0,0 +1 @@
+952fd3dc4b2493b5cf0790d7da6b6e57
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux/svg/custom/image-rescale-expected.png b/LayoutTests/platform/chromium-linux/svg/custom/image-rescale-expected.png
new file mode 100644
index 0000000..8d8b04a
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/svg/custom/image-rescale-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/svg/custom/image-rescale-expected.txt b/LayoutTests/platform/chromium-linux/svg/custom/image-rescale-expected.txt
new file mode 100644
index 0000000..be3d3e5
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/svg/custom/image-rescale-expected.txt
@@ -0,0 +1,6 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 700x400
+ RenderSVGRoot {svg} at (0,0) size 670x210
+ RenderSVGImage {image} at (0,0) size 320x210
+ RenderSVGImage {image} at (350,0) size 320x210 [transform={m=((10.00,0.00)(0.00,10.00)) t=(-3150.00,0.00)}]
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 32deee3..984b1e9 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -836,6 +836,9 @@ BUGWK44514 LINUX WIN : svg/custom/missing-xlink.svg = TEXT
BUGWK44514 MAC : fast/backgrounds/svg-as-background-6.html = IMAGE
BUGWK44514 MAC : svg/zoom/page/zoom-mask-with-percentages.svg = IMAGE
+// Will require rebaseline.
+BUGWK42370 WIN MAC : svg/custom/image-rescale.svg = FAIL
+
// -----------------------------------------------------------------
// End SVG Regressions
// -----------------------------------------------------------------
diff --git a/LayoutTests/platform/mac/svg/custom/image-rescale-expected.checksum b/LayoutTests/platform/mac/svg/custom/image-rescale-expected.checksum
new file mode 100644
index 0000000..ef327c4
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/image-rescale-expected.checksum
@@ -0,0 +1 @@
+917ccc88f3cfe6f2d9117e035758a8ce
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/image-rescale-expected.png b/LayoutTests/platform/mac/svg/custom/image-rescale-expected.png
new file mode 100644
index 0000000..0f4f811
Binary files /dev/null and b/LayoutTests/platform/mac/svg/custom/image-rescale-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/image-rescale-expected.txt b/LayoutTests/platform/mac/svg/custom/image-rescale-expected.txt
new file mode 100644
index 0000000..be3d3e5
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/image-rescale-expected.txt
@@ -0,0 +1,6 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 700x400
+ RenderSVGRoot {svg} at (0,0) size 670x210
+ RenderSVGImage {image} at (0,0) size 320x210
+ RenderSVGImage {image} at (350,0) size 320x210 [transform={m=((10.00,0.00)(0.00,10.00)) t=(-3150.00,0.00)}]
diff --git a/LayoutTests/svg/custom/image-rescale.svg b/LayoutTests/svg/custom/image-rescale.svg
new file mode 100644
index 0000000..e274b70
--- /dev/null
+++ b/LayoutTests/svg/custom/image-rescale.svg
@@ -0,0 +1,8 @@
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ id="drawingArea-layers" width="700" height="400" >
+ <image x="0" y="0" width="320" height="210" xlink:href="resources/image-rescale.jpg" />
+ <image x="350" y="0" width="32.0" height="21.0" transform="translate(350 0) scale(10) translate(-350 0)"
+ xlink:href="resources/image-rescale.jpg" />
+</svg>
diff --git a/LayoutTests/svg/custom/resources/image-rescale.jpg b/LayoutTests/svg/custom/resources/image-rescale.jpg
new file mode 100644
index 0000000..a827f37
Binary files /dev/null and b/LayoutTests/svg/custom/resources/image-rescale.jpg differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 138b6de..21f7ae9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-28 W. James MacLean <wjmaclean at chromium.org>
+
+ Reviewed by James Robinson.
+
+ Scaled Resized images are blurred when sent to Skia
+ https://bugs.webkit.org/show_bug.cgi?id=42370
+
+ This patch modifies ImageSkia.cpp to fix the calculation of resampled
+ bitmap sizes so as to include the transform matrix of the canvas.
+
+ Test: svg/custom/image-rescale.svg
+
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::computeResamplingMode):
+ (WebCore::drawResampledBitmap):
+
2010-09-28 James Robinson <jamesr at chromium.org>
[chromium] Decrease warning level on chromium linux temporarily. This is causing failures on some bots
diff --git a/WebCore/platform/graphics/skia/ImageSkia.cpp b/WebCore/platform/graphics/skia/ImageSkia.cpp
index 23e7be6..e123256 100644
--- a/WebCore/platform/graphics/skia/ImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageSkia.cpp
@@ -143,7 +143,9 @@ static ResamplingMode computeResamplingMode(PlatformContextSkia* platformContext
// Everything else gets resampled.
// If the platform context permits high quality interpolation, use it.
- if (platformContext->interpolationQuality() == InterpolationHigh)
+ // High quality interpolation only enabled for scaling and translation.
+ if (platformContext->interpolationQuality() == InterpolationHigh
+ && !(platformContext->canvas()->getTotalMatrix().getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)))
return RESAMPLE_AWESOME;
return RESAMPLE_LINEAR;
@@ -173,8 +175,12 @@ static void drawResampledBitmap(SkCanvas& canvas, SkPaint& paint, const NativeIm
&& srcIRect.height() == bitmap.height();
// We will always draw in integer sizes, so round the destination rect.
+ // First we need to apply canvas transformation matrix to get desired size of
+ // resampled image.
+ SkRect destRectTransformed;
+ canvas.getTotalMatrix().mapRect(&destRectTransformed, destRect);
SkIRect destRectRounded;
- destRect.round(&destRectRounded);
+ destRectTransformed.round(&destRectRounded);
SkIRect resizedImageRect = // Represents the size of the resized image.
{ 0, 0, destRectRounded.width(), destRectRounded.height() };
@@ -188,7 +194,10 @@ static void drawResampledBitmap(SkCanvas& canvas, SkPaint& paint, const NativeIm
// Compute the visible portion of our rect.
SkRect destBitmapSubsetSk;
ClipRectToCanvas(canvas, destRect, &destBitmapSubsetSk);
- destBitmapSubsetSk.offset(-destRect.fLeft, -destRect.fTop);
+ // Determine size of resampled image based on clipped destination rect.
+ SkRect destBitmapSubsetSkTransformed;
+ canvas.getTotalMatrix().mapRect(&destBitmapSubsetSkTransformed, destBitmapSubsetSk);
+ destBitmapSubsetSkTransformed.offset(-destBitmapSubsetSkTransformed.fLeft, -destBitmapSubsetSkTransformed.fTop);
// The matrix inverting, etc. could have introduced rounding error which
// causes the bounds to be outside of the resized bitmap. We round outward
@@ -196,7 +205,7 @@ static void drawResampledBitmap(SkCanvas& canvas, SkPaint& paint, const NativeIm
// need, and then clamp to the bitmap bounds so we don't get any invalid
// data.
SkIRect destBitmapSubsetSkI;
- destBitmapSubsetSk.roundOut(&destBitmapSubsetSkI);
+ destBitmapSubsetSkTransformed.roundOut(&destBitmapSubsetSkI);
if (!destBitmapSubsetSkI.intersect(resizedImageRect))
return; // Resized image does not intersect.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list