<?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>252795</bug_id>
          
          <creation_ts>2023-02-22 20:59:51 -0800</creation_ts>
          <short_desc>[WebGL] Avoid using glReadPixels to paint WebGL canvas into 2D canvas</short_desc>
          <delta_ts>2023-04-03 13:44:57 -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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dan Glastonbury">djg</reporter>
          <assigned_to name="Dan Glastonbury">djg</assigned_to>
          <cc>dino</cc>
    
    <cc>fujii</cc>
    
    <cc>kbr</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1936061</commentid>
    <comment_count>0</comment_count>
    <who name="Dan Glastonbury">djg</who>
    <bug_when>2023-02-22 20:59:51 -0800</bug_when>
    <thetext>Current codepath works like:

* Send request to read the back buffer to a pixel-buffer
* Create native image from pixel-buffer
* Draw native image to context 2D

We should try to do better especially when GPUP is enabled because this leads to:

* WP: Send request to read the back buffer to a pixel buffer
* GPUP: glReadPixels to a malloc buffer (WebCore::PixelBuffer)
* GPUP: Send the pixel buffer to WP
* WP: Creates native image out of that, sends that to GPUP
* GPUP: draws that native image to Context2D back-buffer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1936062</commentid>
    <comment_count>1</comment_count>
    <who name="Dan Glastonbury">djg</who>
    <bug_when>2023-02-22 21:01:05 -0800</bug_when>
    <thetext>&lt;rdar://87173127&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1936063</commentid>
    <comment_count>2</comment_count>
    <who name="Dan Glastonbury">djg</who>
    <bug_when>2023-02-22 21:07:51 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/10560</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946244</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-03 11:13:48 -0700</bug_when>
    <thetext>Committed 262518@main (50ae4e81ccce): &lt;https://commits.webkit.org/262518@main&gt;

Reviewed commits have been landed. Closing PR #10560 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946305</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-04-03 13:44:57 -0700</bug_when>
    <thetext>Regressed: Bug 254942 – REGRESSION(262518@main) [cairo] Crash under GraphicsContextGL::paintToCanvas</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>