<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>250899</bug_id>
          
          <creation_ts>2023-01-20 07:26:53 -0800</creation_ts>
          <short_desc>Cocoa readPixels is slower in GPUP WebGL than in-process WebGL</short_desc>
          <delta_ts>2023-05-22 05:22:44 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGL</component>
          <version>Safari 15</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=252876</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>251431</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kimmo Kinnunen">kkinnunen</reporter>
          <assigned_to name="Kimmo Kinnunen">kkinnunen</assigned_to>
          <cc>dino</cc>
    
    <cc>kbr</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zdobersek</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1926891</commentid>
    <comment_count>0</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2023-01-20 07:26:53 -0800</bug_when>
    <thetext>GPUP WebGL readPixels is slower than in process
Should and could be improved</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1926892</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-01-20 07:27:02 -0800</bug_when>
    <thetext>&lt;rdar://problem/104475196&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927762</commentid>
    <comment_count>2</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2023-01-24 02:28:40 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/9029</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929352</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-01-30 03:27:20 -0800</bug_when>
    <thetext>Committed 259550@main (4fbc3e1ca2be): &lt;https://commits.webkit.org/259550@main&gt;

Reviewed commits have been landed. Closing PR #9029 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929391</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-30 07:38:28 -0800</bug_when>
    <thetext>Hi, this won&apos;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&amp;) = default;
        ^
/home/mcatanzaro/Projects/WebKit/Source/WebKit/Platform/SharedMemory.h:98:36: note: copy constructor of &apos;Handle&apos; is implicitly deleted because field &apos;m_handle&apos; has a deleted copy constructor
        mutable UnixFileDescriptor m_handle;
                                   ^
/home/mcatanzaro/Projects/WebKit/WebKitBuild/gtk4/WTF/Headers/wtf/unix/UnixFileDescriptor.h:37:26: note: &apos;UnixFileDescriptor&apos; has been explicitly marked deleted here
    WTF_MAKE_NONCOPYABLE(UnixFileDescriptor);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929392</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-30 07:39:39 -0800</bug_when>
    <thetext>I&apos;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&amp;) = default;
         Handle(Handle&amp;&amp;) = default;
-        Handle&amp; operator=(const Handle&amp;) = default;
         Handle&amp; operator=(Handle&amp;&amp;) = default;
 
+#if PLATFORM(COCOA)
+        Handle(const Handle&amp;) = default;
+        Handle&amp; operator=(const Handle&amp;) = default;
+#endif
+
         bool isNull() const;
 
         size_t size() const { return m_size; }

and see if that works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929393</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-30 07:44:09 -0800</bug_when>
    <thetext>So that does seem to work. It doesn&apos;t feel great, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929402</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-30 07:57:44 -0800</bug_when>
    <thetext>Zan has a better solution in https://github.com/WebKit/WebKit/pull/9310</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929410</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-30 08:09:44 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #7)
&gt; 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?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>