| Summary: | [GPU Process] Canvas compositing buffer should be created through its GraphicsContext | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||
| Component: | Canvas | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bfulgham, cdumez, changseok, dino, esprehn+autocc, ews-watchlist, gyuyoung.kim, jonlee, simon.fraser, webkit-bug-importer, zalan | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 236508 | ||||||||
| Attachments: |
|
||||||||
|
Description
Said Abou-Hallawa
2022-02-27 15:52:36 PST
Created attachment 453357 [details]
Patch
Comment on attachment 453357 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453357&action=review > Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:1833 > - auto buffer = createCompositingBuffer(bufferRect); > - if (!buffer) > - return; > - > auto* c = drawingContext(); > if (!c) > return; > > + auto buffer = c->createImageBuffer(bufferRect.size()); > + if (!buffer) > + return; I'm confused by this ordering change. Doesn't drawingContext() need to get the context from the image buffer? Comment on attachment 453357 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453357&action=review >> Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:1833 >> + return; > > I'm confused by this ordering change. Doesn't drawingContext() need to get the context from the image buffer? drawingContext() returns the GraphicsContext of CanvasBase::m_imageBuffer which must have been created before entering this function. But 'buffer' is just a scratch ImageBuffer that we need to create for compositing the image to the drawingContext(). The fix just made it compatible with drawingContext(). In fact the reordering should not have any effect even without the new way to create the 'buffer'. *** Bug 236929 has been marked as a duplicate of this bug. *** Created attachment 453647 [details]
Patch
Committed r290839 (248075@main): <https://commits.webkit.org/248075@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 453647 [details]. |