Summary: | Lower the default canvas interpolation quality for platforms that use CG | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matthew Delaney <mdelaney7> | ||||||||
Component: | Layout and Rendering | Assignee: | Matthew Delaney <mdelaney7> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | adele, aroben, cmarcelo, commit-queue, ggaren, hyatt, oliver, simon.fraser | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.5 | ||||||||||
Bug Depends on: | 46243 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Matthew Delaney
2010-09-13 17:14:51 PDT
Created attachment 67542 [details]
Patch
This patch is likely WIP due to it possibly causing a small issue in 2 of the canvas layout tests. Will investigate very soon. Comment on attachment 67542 [details]
Patch
r- due to layout test failures.
Why not do this on Windows, too? Why not on all platforms? (In reply to comment #5) > Why not on all platforms? It should be PLATFORM(CG) as the specific problem is that CG's high quality is higher quality (and hence slower) than any other graphics libraries high quality. Medium quality in CG is trilinear filtering, which is higher quality than anything firefox, et al use anywhere afaik Yes, Oliver said it well. This is specifically to address CG. Cross-platform, there is a concept of basically 4 possible "Interpolation Quality" settings: none, low, medium, and high. Per platform, these quality settings match to different scaling algorithms. CG's low setting happens to be others' high/medium settings which is quantized bilinear interpolation. AFAIK, everywhere else in webkit, we're using CG's high setting. This patch is just changing the quality setting used in the CG version of canvas. Created attachment 68584 [details]
Patch
Comment on attachment 68584 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68584&action=review > WebCore/html/canvas/CanvasRenderingContext2D.cpp:140 > + if (GraphicsContext* c = drawingContext()) > + c->setImageInterpolationQuality(DefaultInterpolationQuality); We deliberately delayed creation of the underlying ImageBuffer in the canvas so that we don't end up doing a whole lot of work on an imagebuffer that is going to be thrown out. Also this means when we do throw out the buffer and then recreate it we won't reset the interpolation quality. The existing location of the call to setInterpolation quality is the correct one. Created attachment 68624 [details]
Patch
Comment on attachment 68624 [details] Patch Clearing flags on attachment: 68624 Committed r68221: <http://trac.webkit.org/changeset/68221> All reviewed patches have been landed. Closing bug. Revision r68221 cherry-picked into qtwebkit-2.1-x with commit 318b799eee638d69247276fa8b9ba48027562bcd <http://gitorious.org/webkit/qtwebkit/commit/318b799eee638d69247276fa8b9ba48027562bcd> |