Summary: | [Qt] Support IMAGE_DECODER_DOWN_SAMPLING flag | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Allan Sandfeld Jensen <allan.jensen> | ||||||
Component: | Images | Assignee: | Allan Sandfeld Jensen <allan.jensen> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | webkit.review.bot, zoltan | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Allan Sandfeld Jensen
2012-05-30 03:57:56 PDT
Created attachment 144784 [details]
Patch
Comment on attachment 144784 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=144784&action=review > Source/WebCore/platform/graphics/Image.cpp:173 > + const IntSize origSize = size(); realSize? > Source/WebCore/platform/graphics/Image.cpp:175 > + // We assume down-sampling zoom rates in X direction and in Y direction are same. Could we assert that assumption? > Source/WebCore/platform/graphics/qt/ImageQt.cpp:250 > + adjustSourceRectForDownSampling(wtfNormalizedSrc, wtfImageSize); Impossible to see that these are out variables. Can we please use pointers FloatRect newNormalizedSource(normalizedSrc); adjustSourceRectForDownSampling(&newNormalizedSource, IntSize(image->size()); normalizedSrc = QRectF(newNormalizedSource); (In reply to comment #2) > (From update of attachment 144784 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=144784&action=review > > > Source/WebCore/platform/graphics/Image.cpp:173 > > + const IntSize origSize = size(); > > realSize? > > > Source/WebCore/platform/graphics/Image.cpp:175 > > + // We assume down-sampling zoom rates in X direction and in Y direction are same. > > Could we assert that assumption? > > > Source/WebCore/platform/graphics/qt/ImageQt.cpp:250 > > + adjustSourceRectForDownSampling(wtfNormalizedSrc, wtfImageSize); > > Impossible to see that these are out variables. Can we please use pointers > The entire function is moved from ImageOpenVG.cpp and only slightly modified, but I guess that shouldn't stop me from making it prettier. Not sure about realSize though, I might as well argue that the scaledSize is the real size. Created attachment 144819 [details]
Patch
Comment on attachment 144819 [details] Patch Clearing flags on attachment: 144819 Committed r118947: <http://trac.webkit.org/changeset/118947> All reviewed patches have been landed. Closing bug. |