Bug 32405 - [Qt] canvas clipping is buggy
Summary: [Qt] canvas clipping is buggy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Major
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2009-12-10 20:11 PST by Noam Rosenthal
Modified: 2010-02-16 01:18 PST (History)
7 users (show)

See Also:


Attachments
Fix GraphicsContext::roundToDevicePixels in Qt (3.16 KB, patch)
2010-02-13 19:11 PST, Noam Rosenthal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Rosenthal 2009-12-10 20:11:02 PST
test case: http://glimr.rubyforge.org/cake/canvas.html, choose ImageTest in the combo box

The image rotates and moves very slowly and with a lot of artifacts and flickers, compared to Safari/Chrome.
Comment 1 Benjamin Poulain 2009-12-11 05:21:49 PST
Confirmed.

Here is the direct link to the test : http://glimr.rubyforge.org/cake/canvas.html#KeyboardTest

The image should not be clipped when transformed.
Comment 2 Noam Rosenthal 2010-02-13 19:11:12 PST
Created attachment 48713 [details]
Fix GraphicsContext::roundToDevicePixels in Qt

I found the source of the problem - our GraphicsContext::roundToDevicePixels function is wrong, as it doesn't make the right calculation in the case of rotating images.
The attached fix makes that function completely equivalent to the CG implementation, and rotating canvas images now look fine!
Comment 3 Simon Hausmann 2010-02-15 07:14:23 PST
Nice! I've seen this bug a few times in the past.

Any chance that this is also covered by an existing but currently skipped canvas layout test?

Adding Ariya to CC, he's more qualified than me to review this piece :)
Comment 4 Ariya Hidayat 2010-02-16 00:30:31 PST
Comment on attachment 48713 [details]
Fix GraphicsContext::roundToDevicePixels in Qt

Looks good.
Comment 5 WebKit Commit Bot 2010-02-16 01:17:50 PST
Comment on attachment 48713 [details]
Fix GraphicsContext::roundToDevicePixels in Qt

Clearing flags on attachment: 48713

Committed r54811: <http://trac.webkit.org/changeset/54811>
Comment 6 WebKit Commit Bot 2010-02-16 01:18:03 PST
All reviewed patches have been landed.  Closing bug.