Bug 25458 - Restore alignment to device pixel boundaries.
Summary: Restore alignment to device pixel boundaries.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: David Carson
Depends on:
Reported: 2009-04-28 14:58 PDT by David Carson
Modified: 2011-07-26 17:50 PDT (History)
5 users (show)

See Also:

patch (1.36 KB, patch)
2009-04-28 15:02 PDT, David Carson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Carson 2009-04-28 14:58:58 PDT
It seems that the calls to roundToDevicePixel() were dropped in http://trac.webkit.org/changeset/34210 
This results in blurry images when zoomed out as the images are not aligned to pixel boundaries. 
I spoke with the author of r34210 change and he said that it caused some regression of images. After some investigation, the regression seems to be because of the srcRect being aligned as well as the destination rect.
 I would like to restore this feature.
Comment 1 David Carson 2009-04-28 15:02:43 PDT
Created attachment 29864 [details]
Comment 2 David Carson 2009-04-28 15:03:40 PDT
Ran DRT and there was no regressions on my platform.
Comment 3 Dave Hyatt 2009-04-28 16:10:55 PDT
Comment on attachment 29864 [details]

Comment 4 David Carson 2009-04-28 18:00:38 PDT
Didn't run pixel tests.
When I run those, these tests have an issue:
svg/W3C-SVG-1.1/render-groups-03-t.svg	expected image	image diffs	0.16%
svg/carto.net/scrollbar.svg	expected image	image diffs	0.15%
svg/custom/focus-ring.svg	expected image	image diffs	0.19%
svg/custom/image-small-width-height.svg	expected image	image diffs	0.33%

Comment 5 David Carson 2009-04-28 18:21:22 PDT
With the test case:
The focus ring is now in the correct place!
With the test case:
There was slight blurriness where the blue bar meets the green checker pattern. The line is now much sharper.
Comment 6 David Kilzer (:ddkilzer) 2009-04-28 21:39:18 PDT
This pixel test seems to have regressed with this patch:  fast/repaint/fixed.html
Comment 7 David Kilzer (:ddkilzer) 2009-04-28 21:49:45 PDT
(In reply to comment #6)
> This pixel test seems to have regressed with this patch: 
> fast/repaint/fixed.html

Mitz informs me this is:  https://bugs.webkit.org/show_bug.cgi?id=25269

Since the test is already broken, I will check in new results with this patch.
Comment 8 David Kilzer (:ddkilzer) 2009-04-28 22:52:59 PDT
$ git svn dcommit
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	M	LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum
	M	LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.png
	M	LayoutTests/platform/mac/svg/custom/focus-ring-expected.checksum
	M	LayoutTests/platform/mac/svg/custom/focus-ring-expected.png
	M	LayoutTests/platform/mac/svg/custom/image-small-width-height-expected.checksum
	M	LayoutTests/platform/mac/svg/custom/image-small-width-height-expected.png
	M	WebCore/ChangeLog
	M	WebCore/platform/graphics/cg/ImageCG.cpp
Committed r42987

Comment 9 mitz 2009-04-29 21:42:00 PDT
This change caused bug 25476.
Comment 10 David Kilzer (:ddkilzer) 2009-04-30 11:29:01 PDT
Reopening as this change was backed out for Bug 25476.
Comment 11 David Levin 2009-05-06 12:56:45 PDT
Comment on attachment 29864 [details]

Clearing r+ to move out of commit queue (and since the change was backed out due to some failed test).