This will force the SVG resources (i.e. clippers, masks, patterns and gradients) to apply their drawing in the GPU Process. The filters are tracked by bug 231253. We still need to optimize the usage of these ImageBuffers, like not getting a NativeImage from the remote ImageBuffer in WebProcess and then draw the NativeImage to another remote ImageBuffer.
<rdar://problem/87402419>
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].