Summary: | [CG] Flushing ImageBuffer IOSurface cached image can happen when creating an image for encoding only | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||||||
Component: | Canvas | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | dino, simon.fraser, thorton, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Said Abou-Hallawa
2020-07-17 23:55:01 PDT
Created attachment 404637 [details]
Patch
Created attachment 404687 [details]
Patch
This patch gives a 15% progression to the Images test on MacBookPro15,2. I would expect all macOS and iOS devices will see similar progression. Created attachment 404688 [details]
Patch
Comment on attachment 404688 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404688&action=review > Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h:71 > + mutable bool m_pendingFlushCachedImage { false }; I think this needs a better name. Maybe m_requiresDrawAfterPutImageData or something. It's not really a "pending" (that's used for "something is going to happen in future"). Can we set m_pendingFlushCachedImage to false whenever any other CG drawing takes place as well? Created attachment 404732 [details]
Patch
Comment on attachment 404688 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404688&action=review >> Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h:71 >> + mutable bool m_pendingFlushCachedImage { false }; > > I think this needs a better name. Maybe m_requiresDrawAfterPutImageData or something. It's not really a "pending" (that's used for "something is going to happen in future"). > > Can we set m_pendingFlushCachedImage to false whenever any other CG drawing takes place as well? Setting m_pendingFlushCachedImage after any other CG drawing takes place will be a little bit involving because we have to hack all the CanvasRenderingContext2D drawing functions. I think we can look at this later. Committed r264615: <https://trac.webkit.org/changeset/264615> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404732 [details]. |