<?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>177132</bug_id>
          
          <creation_ts>2017-09-19 05:04:39 -0700</creation_ts>
          <short_desc>WebGL canvas passed to drawImage is very slow</short_desc>
          <delta_ts>2022-07-18 14:39:29 -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>Canvas</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>macOS 10.13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ashley Gullen">ashley</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>dino</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1350286</commentid>
    <comment_count>0</comment_count>
    <who name="Ashley Gullen">ashley</who>
    <bug_when>2017-09-19 05:04:39 -0700</bug_when>
    <thetext>Steps to reproduce:

1. Visit: http://www.scirra.com/labs/bugs/webgl-canvas2d-perf.html
2. Observe the FPS reading


Actual results:

The demo simply creates a window-sized WebGL canvas which changes every frame, and copies it to a window-sized 2D canvas with drawImage(). On a mid-2015 Macbook Pro, this runs at about ~25 FPS.


Expected results:

It should run at 60 FPS, as it does in Chrome.

Drawing a WebGL canvas to a 2D canvas is a simple workaround for rendering multiple views of one WebGL context. We use this in Construct 3 at https://editor.construct.net, and so this overload of drawImage() is critical to the performance of our web app and this issue causes it to be unnecessarily slow. The poor performance suggests a CPU readback is happening per frame, when it should be possible to fully GPU accelerate this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1884884</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-07-18 14:39:29 -0700</bug_when>
    <thetext>The relevant test site no longer exists. We can&apos;t take further action on this bug report.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>