Bug 209515

Summary: [WebGL2] Update texture packing code for software uploads from DOM
Product: WebKit Reporter: Kenneth Russell <kbr>
Component: WebGLAssignee: Kenneth Russell <kbr>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dino, esprehn+autocc, ews-watchlist, graouts, gyuyoung.kim, justin_fan, kondapallykalyan, noam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 209510, 210766    
Attachments:
Description Flags
Patch none

Description Kenneth Russell 2020-03-24 15:38:24 PDT
The texture packing code for software texture uploads from DOM elements needs to be updated to support WebGL 2.0 formats. This includes code in:

Source/WebCore/platform/graphics/FormatConverter.{cpp,h}
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp, GraphicsContextGLOpenGL::packPixels

and others.
Comment 1 Kenneth Russell 2020-04-22 17:02:16 PDT
Created attachment 397290 [details]
Patch
Comment 2 Dean Jackson 2020-04-23 12:17:18 PDT
Comment on attachment 397290 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=397290&action=review

> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4338
> +    uint8_t* data = reinterpret_cast<uint8_t*>(
> +        pixels ? pixels->baseAddress() : nullptr); // NEEDS_PORT

We tend to do this on one line.
Comment 3 Kenneth Russell 2020-04-23 12:30:53 PDT
Comment on attachment 397290 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=397290&action=review

>> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4338
>> +        pixels ? pixels->baseAddress() : nullptr); // NEEDS_PORT
> 
> We tend to do this on one line.

OK, will keep that in mind and fix this up in a subsequent patch. I'd like to try to get this in sooner so am CQ+'ing it now.
Comment 4 EWS 2020-04-23 12:44:08 PDT
Committed r260588: <https://trac.webkit.org/changeset/260588>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397290 [details].
Comment 5 Radar WebKit Bug Importer 2020-04-23 12:45:16 PDT
<rdar://problem/62257803>