Currently the Qt platform does not work correctly with the IMAGE_DECODER_DOWN_SAMPLING flag set.
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.