<?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>222268</bug_id>
          
          <creation_ts>2021-02-22 06:46:52 -0800</creation_ts>
          <short_desc>Videos do not work as sources for WebGL TexImage calls in SW fallback case in GPU Process</short_desc>
          <delta_ts>2021-02-26 16:04:46 -0800</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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>222461</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=222461</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>
          
          <blocked>217211</blocked>
    
    <blocked>221838</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kimmo Kinnunen">kkinnunen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jer.noble</cc>
    
    <cc>peng.liu6</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1732113</commentid>
    <comment_count>0</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-02-22 06:46:52 -0800</bug_when>
    <thetext>Videos do not work as sources for WebGL TexImage calls in SW fallback case in GPU Process

void MediaPlayerPrivateRemote::paintCurrentFrameInContext(GraphicsContext&amp;, const FloatRect&amp;)
{
    notImplemented();
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1732115</commentid>
    <comment_count>1</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-02-22 06:53:32 -0800</bug_when>
    <thetext>Options to fix:
1) Implement readback in MediaPlayerPrivateRemote::paintCurrentFrameInContext
2) Move the ImageBuffer -&gt; Texture logic from WebGLRenderingContextBase to GraphicsContextGL

2 is better long term</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1733009</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-02-24 11:59:29 -0800</bug_when>
    <thetext>&lt;rdar://problem/74706834&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1733017</commentid>
    <comment_count>3</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-02-24 12:12:43 -0800</bug_when>
    <thetext>For option 2:
The work is to convert 
void WebGLRenderingContextBase::texImageImpl(TexImageFunctionID functionID, GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLenum format, GCGLenum type, Image* image, GraphicsContextGL::DOMSource domSource, bool flipY, bool premultiplyAlpha, bool ignoreNativeImageAlphaPremultiplication, const IntRect&amp; sourceImageRect, GCGLsizei depth, GCGLint unpackImageHeight)

to run on GPU process side resources.

Essentially converting Image* image to GPU process side resource.

However, that function _also_ needs to stay mostly working with Web process side resources, since some of the cases are such that probably no reasonable GPU process side resource exist.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1733979</commentid>
    <comment_count>4</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2021-02-26 14:31:18 -0800</bug_when>
    <thetext>This was likely fixed by r273568, which will pull images across the process boundary when painting/texturing occurs there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1734053</commentid>
    <comment_count>5</comment_count>
    <who name="Peng Liu">peng.liu6</who>
    <bug_when>2021-02-26 16:04:46 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 222461 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>