<?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>240380</bug_id>
          
          <creation_ts>2022-05-13 05:05:20 -0700</creation_ts>
          <short_desc>Capturing a canvas that is not in the DOM can lead to erratic frame rates or no frame emission at all</short_desc>
          <delta_ts>2022-05-25 20:16:10 -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>Media</component>
          <version>WebKit Nightly Build</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="youenn fablet">youennf</reporter>
          <assigned_to name="Dan Glastonbury">djg</assigned_to>
          <cc>claudio.destro</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1868726</commentid>
    <comment_count>0</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2022-05-13 05:05:20 -0700</bug_when>
    <thetext>Capturing a canvas that is not in the DOM can lead to erratic frame rates or no frame emission at all</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868727</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-13 05:05:45 -0700</bug_when>
    <thetext>&lt;rdar://problem/93239022&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868819</commentid>
    <comment_count>2</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2022-05-13 11:49:39 -0700</bug_when>
    <thetext>Test case is https://jsfiddle.net/0b3dqxeg/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869588</commentid>
    <comment_count>3</comment_count>
    <who name="Claudio Destro">claudio.destro</who>
    <bug_when>2022-05-16 23:10:56 -0700</bug_when>
    <thetext>Hi hope this helps:

in our solution, canvas with CSS fixed position works</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869591</commentid>
    <comment_count>4</comment_count>
    <who name="Claudio Destro">claudio.destro</who>
    <bug_when>2022-05-16 23:15:39 -0700</bug_when>
    <thetext>Example missing (sorry):

modify the test case to:

&lt;canvas id=&quot;canvas2&quot; style=&quot;position: fixed; bottom: 0; right: 0; width: 100px&quot;&gt;&lt;/canvas&gt;

videos still not playing in 15.4 desktop (they show a red background and nothing else happens)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869626</commentid>
    <comment_count>5</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2022-05-17 02:39:00 -0700</bug_when>
    <thetext>I did some investigations:
- CanvasCaptureMediaStreamTrack::Source::canvasChanged is correctly called each time the not-in-dom canvas is changed but it returns early due to m_canvas-&gt;renderingContext()-&gt;needsPreparationForDisplay() returning true.
- Normally, the page will call updateRendering which will make the actual preparation happening, which in turn will tell CanvasCaptureMediaStreamTrack::Source to generate a frame. This is what happens when canvas is in the DOM. When canvas is not in the DOM, Page::updateRendering is not called as often and this impacts the canvas track frame rate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1871059</commentid>
    <comment_count>6</comment_count>
    <who name="Dan Glastonbury">djg</who>
    <bug_when>2022-05-22 21:18:37 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/901</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1871934</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-05-25 20:16:07 -0700</bug_when>
    <thetext>Committed r294864 (250996@main): &lt;https://commits.webkit.org/250996@main&gt;

Reviewed commits have been landed. Closing PR #901 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>