<?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>273974</bug_id>
          
          <creation_ts>2024-05-09 14:54:08 -0700</creation_ts>
          <short_desc>UNPACK_COLORSPACE_CONVERSION_WEBGL should only be used from texImage2D and texSubImage2D calls taking HTMLImageElement</short_desc>
          <delta_ts>2024-05-09 16:29:00 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></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>
          
          <blocked>272015</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Gerald Squelart">g_squelart</reporter>
          <assigned_to name="Gerald Squelart">g_squelart</assigned_to>
          <cc>dino</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>2034409</commentid>
    <comment_count>0</comment_count>
    <who name="Gerald Squelart">g_squelart</who>
    <bug_when>2024-05-09 14:54:08 -0700</bug_when>
    <thetext>According to the specs https://registry.khronos.org/webgl/specs/latest/1.0/#PIXEL_STORAGE_PARAMETERS :
&gt; UNPACK_COLORSPACE_CONVERSION_WEBGL of type unsigned long
&gt;     If set to BROWSER_DEFAULT_WEBGL, then the browser&apos;s default colorspace conversion is applied during subsequent texImage2D and texSubImage2D calls taking HTMLImageElement. [...]
&gt; If the TexImageSource is an ImageBitmap, then [this] parameter will be ignored.

But looking at the source code in WebGLRenderingContextBase.cpp, I see that it&apos;s used in `WebGLRenderingContextBase::texImageImpl`, which is called from `WebGLRenderingContextBase::texImageSource(..., HTMLImageElement&amp; source)` (as expected), but also from others that take `ImageBitmap`, `HTMLCanvasElement`, etc.

rdar://127580661</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2034434</commentid>
    <comment_count>1</comment_count>
    <who name="Gerald Squelart">g_squelart</who>
    <bug_when>2024-05-09 16:29:00 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/28371</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>