Bug 250899
| Summary: | Cocoa readPixels is slower in GPUP WebGL than in-process WebGL | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kimmo Kinnunen <kkinnunen> |
| Component: | WebGL | Assignee: | Kimmo Kinnunen <kkinnunen> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | dino, kbr, kkinnunen, mcatanzaro, webkit-bug-importer, zdobersek |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 15 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=252876 | ||
| Bug Depends on: | 251431 | ||
| Bug Blocks: | |||
Kimmo Kinnunen
GPUP WebGL readPixels is slower than in process
Should and could be improved
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/104475196>
Kimmo Kinnunen
Pull request: https://github.com/WebKit/WebKit/pull/9029
EWS
Committed 259550@main (4fbc3e1ca2be): <https://commits.webkit.org/259550@main>
Reviewed commits have been landed. Closing PR #9029 and removing active labels.
Michael Catanzaro
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);
Michael Catanzaro
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.
Michael Catanzaro
So that does seem to work. It doesn't feel great, though.
Michael Catanzaro
Zan has a better solution in https://github.com/WebKit/WebKit/pull/9310
Michael Catanzaro
(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?