[webkit-reviews] review granted: [Bug 217573] [GPU Process][Resource caching 5/7]: Clean the DisplayList recording of the NativeImage : [Attachment 411662] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Oct 17 11:05:08 PDT 2020
Simon Fraser (smfr) <simon.fraser at apple.com> has granted review:
Bug 217573: [GPU Process][Resource caching 5/7]: Clean the DisplayList
recording of the NativeImage
https://bugs.webkit.org/show_bug.cgi?id=217573
Attachment 411662: Patch
https://bugs.webkit.org/attachment.cgi?id=411662&action=review
--- Comment #6 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 411662
--> https://bugs.webkit.org/attachment.cgi?id=411662
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=411662&action=review
> Source/WebCore/platform/graphics/BitmapImage.cpp:218
> + // Subsampling may have given us an image that is smaller than size().
> + IntSize subsampledImageSize = nativeImageSize(image);
> + if (options.orientation().usesWidthAsHeight())
> + subsampledImageSize = subsampledImageSize.transposedSize();
> +
> + // srcRect is in the coordinates of the unsubsampled image, so we have
to map it to the subsampled image.
> + FloatRect adjustedSrcRect = srcRect;
> + if (subsampledImageSize != srcSize)
> + adjustedSrcRect = mapRect(srcRect, FloatRect({ }, srcSize),
FloatRect({ }, subsampledImageSize));
What justifies this code being here and not inside
GraphicsContext::drawNativeImage?
More information about the webkit-reviews
mailing list