| Summary: | [CG] Create a sub-image when drawing an image only if the destination image will be enlarged, rotated or sheared | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||||||||
| Component: | Images | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | cdumez, changseok, esprehn+autocc, ews-watchlist, gyuyoung.kim, simon.fraser, webkit-bug-importer | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=227614 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Said Abou-Hallawa
2021-06-11 01:39:18 PDT
Created attachment 431184 [details]
Patch
Created attachment 431271 [details]
Patch
Created attachment 431298 [details]
Patch
Created attachment 431303 [details]
Patch
This patch fixes the following: 1. The perf problem in the emoji dropdown of twitter.com editor because no sub-images are created to display the emoji images. 2. The perf problem in the http://www.antutu.com/html5/collision.html because sub-images are created to display the rotated balls. 3. The display of the canvas in the layout test: fast/canvas/drawImage-with-negative-source-destination.html which has been broken for sometime. Comment on attachment 431303 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=431303&action=review > Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:230 > +static inline bool shouldUseSubimage(CGInterpolationQuality interpolationQuality, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& transform) This could be a lambda function. > Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:241 > +static inline RetainPtr<CGImageRef> getSubimage(CGImageRef image, const FloatSize& imageSize, const FloatRect& subimageRect, const ImagePaintingOptions& options) This could be a lambda function. > Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:259 > +static inline FloatSize imageLogicalSize(CGImageRef image, const ImagePaintingOptions& options) This could be a lambda function. Created attachment 431396 [details]
Patch for landing
Committed r278863 (238807@main): <https://commits.webkit.org/238807@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 431396 [details]. |