| Summary: | Cleanup temporary setting of image interpolation quality in GraphicsContext::drawImage* | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | zalan <zalan> | ||||||
| Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | commit-queue | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
Created attachment 232301 [details]
Patch
Comment on attachment 232301 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232301&action=review OK > Source/WebCore/platform/graphics/GraphicsContext.cpp:98 > + GraphicsContext* m_graphicsContext; Should use a reference instead of a pointer. > Source/WebCore/platform/graphics/GraphicsContext.cpp:100 > + InterpolationQuality m_newInterpolationQuality; Could just store a m_currentInterpolationQuality != m_newInterpolationQuality boolean instead. (In reply to comment #2) > (From update of attachment 232301 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=232301&action=review > > OK > > > Source/WebCore/platform/graphics/GraphicsContext.cpp:98 > > + GraphicsContext* m_graphicsContext; > > Should use a reference instead of a pointer. > > > Source/WebCore/platform/graphics/GraphicsContext.cpp:100 > > + InterpolationQuality m_newInterpolationQuality; > > Could just store a m_currentInterpolationQuality != m_newInterpolationQuality boolean instead. Good point! I'll do that. Created attachment 232303 [details]
Patch
Comment on attachment 232303 [details]
Patch
EWSing
Comment on attachment 232303 [details] Patch Clearing flags on attachment: 232303 Committed r169498: <http://trac.webkit.org/changeset/169498> All reviewed patches have been landed. Closing bug. |
This is highly error prone with all the copy-paste code in GraphicsContext::drawImage, GraphicsContext::drawTiledImage, GraphicsContext::drawImageBuffer. if (useLowQualityScale) { InterpolationQuality previousInterpolationQuality = imageInterpolationQuality(); setImageInterpolationQuality(InterpolationNone); image->draw(this, styleColorSpace, dest, src, op, blendMode, useLowQualityScale); setImageInterpolationQuality(previousInterpolationQuality); } else image->draw(this, styleColorSpace, dest, src, op, blendMode, useLowQualityScale);