| Summary: | [GPU Process] [SVG Resources] Make SVG resources create remote ImageBuffers for their drawing | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||
| Component: | Layout and Rendering | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bfulgham, changseok, darin, dino, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, kondapallykalyan, pdr, schenney, sergio, simon.fraser, webkit-bug-importer, zalan | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 234165 | ||||||||
| Attachments: |
|
||||||||
|
Description
Said Abou-Hallawa
2022-01-11 09:13:50 PST
Created attachment 448852 [details]
Patch
Comment on attachment 448852 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448852&action=review > Source/WebCore/ChangeLog:3 > + [GPU Process] Make SVG resources create remote ImageBuffers for their drawing Is there a way to test that this has the desired result? > Source/WebKit/GPUProcess/graphics/QualifiedResourceHeap.h:164 > + if (!std::holds_alternative<Ref<T>>(iterator->value)) > + return nullptr; > return std::get<Ref<T>>(iterator->value).ptr(); Would be nice to use get_if instead of calling holds_alternative and then get. Would reduce reference count churn, and code would be less repetitive: auto value = std::get_if<Ref<T>>(&iterator->value); return value ? value->ptr() : nullptr; Created attachment 448906 [details]
Patch
Comment on attachment 448852 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448852&action=review >> Source/WebCore/ChangeLog:3 >> + [GPU Process] Make SVG resources create remote ImageBuffers for their drawing > > Is there a way to test that this has the desired result? This change fixed some of the layout tests when running them with "--use-gpu-process". I un-skipped them from LayoutTests/gpu-process/TestExpectations >> Source/WebKit/GPUProcess/graphics/QualifiedResourceHeap.h:164 >> return std::get<Ref<T>>(iterator->value).ptr(); > > Would be nice to use get_if instead of calling holds_alternative and then get. Would reduce reference count churn, and code would be less repetitive: > > auto value = std::get_if<Ref<T>>(&iterator->value); > return value ? value->ptr() : nullptr; Fixed. Committed r287911 (245944@main): <https://commits.webkit.org/245944@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448906 [details]. |