GPUP WebGL readPixels is slower than in process Should and could be improved
<rdar://problem/104475196>
Pull request: https://github.com/WebKit/WebKit/pull/9029
Committed 259550@main (4fbc3e1ca2be): <https://commits.webkit.org/259550@main> Reviewed commits have been landed. Closing PR #9029 and removing active labels.
Hi, this won't work because the object is noncopyable on Unix: /home/mcatanzaro/Projects/WebKit/Source/WebKit/Platform/SharedMemory.h:70:9: error: explicitly defaulted copy constructor is implicitly deleted [-Werror,-Wdefaulted-function-deleted] Handle(const Handle&) = default; ^ /home/mcatanzaro/Projects/WebKit/Source/WebKit/Platform/SharedMemory.h:98:36: note: copy constructor of 'Handle' is implicitly deleted because field 'm_handle' has a deleted copy constructor mutable UnixFileDescriptor m_handle; ^ /home/mcatanzaro/Projects/WebKit/WebKitBuild/gtk4/WTF/Headers/wtf/unix/UnixFileDescriptor.h:37:26: note: 'UnixFileDescriptor' has been explicitly marked deleted here WTF_MAKE_NONCOPYABLE(UnixFileDescriptor);
I'll try this: diff --git a/Source/WebKit/Platform/SharedMemory.h b/Source/WebKit/Platform/SharedMemory.h index 45a30661faa3..ff78942ba3d8 100644 --- a/Source/WebKit/Platform/SharedMemory.h +++ b/Source/WebKit/Platform/SharedMemory.h @@ -67,11 +67,14 @@ public: class Handle { public: Handle() = default; - Handle(const Handle&) = default; Handle(Handle&&) = default; - Handle& operator=(const Handle&) = default; Handle& operator=(Handle&&) = default; +#if PLATFORM(COCOA) + Handle(const Handle&) = default; + Handle& operator=(const Handle&) = default; +#endif + bool isNull() const; size_t size() const { return m_size; } and see if that works.
So that does seem to work. It doesn't feel great, though.
Zan has a better solution in https://github.com/WebKit/WebKit/pull/9310
(In reply to Michael Catanzaro from comment #7) > Zan has a better solution in https://github.com/WebKit/WebKit/pull/9310 Well, I wound up leaving some negative feedback there. Kimmo, any opinion on what to do here?