Bug 273974

Summary: UNPACK_COLORSPACE_CONVERSION_WEBGL should only be used from texImage2D and texSubImage2D calls taking HTMLImageElement
Product: WebKit Reporter: Gerald Squelart <g_squelart>
Component: WebGLAssignee: Gerald Squelart <g_squelart>
Status: ASSIGNED    
Severity: Normal CC: dino, kbr, kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 272015    

Gerald Squelart
Reported 2024-05-09 14:54:08 PDT
According to the specs https://registry.khronos.org/webgl/specs/latest/1.0/#PIXEL_STORAGE_PARAMETERS : > UNPACK_COLORSPACE_CONVERSION_WEBGL of type unsigned long > If set to BROWSER_DEFAULT_WEBGL, then the browser's default colorspace conversion is applied during subsequent texImage2D and texSubImage2D calls taking HTMLImageElement. [...] > 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's used in `WebGLRenderingContextBase::texImageImpl`, which is called from `WebGLRenderingContextBase::texImageSource(..., HTMLImageElement& source)` (as expected), but also from others that take `ImageBitmap`, `HTMLCanvasElement`, etc. rdar://127580661
Attachments
Gerald Squelart
Comment 1 2024-05-09 16:29:00 PDT
Note You need to log in before you can comment on or make changes to this bug.