Use PixelBufferFormat to specify ImageBuffer::getPixelData destination format allowing for more control over data conversion
Created attachment 428639 [details] Patch
Created attachment 428642 [details] Patch
Created attachment 428646 [details] Patch
Created attachment 428647 [details] Patch
Comment on attachment 428647 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428647&action=review Nice improvement here. > Source/WebCore/platform/graphics/ImageBufferBackend.cpp:181 > + unsigned sourceBytesPerRow = 4 * sourcePixelBuffer.size().width(); auto? > Source/WebCore/platform/graphics/ImageBufferBackend.cpp:182 > + const uint8_t* sourceRows = sourcePixelBuffer.data().data() + sourceRectClipped.y() * sourceBytesPerRow + sourceRectClipped.x() * 4; auto? > Source/WebCore/platform/graphics/ImageBufferBackend.cpp:187 > + PixelBufferFormat sourceFormat = sourcePixelBuffer.format(); auto?
Committed r277525 (237753@main): <https://commits.webkit.org/237753@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 428647 [details].
<rdar://problem/78040673>
(In reply to Darin Adler from comment #5) > Comment on attachment 428647 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=428647&action=review > > Nice improvement here. > > > Source/WebCore/platform/graphics/ImageBufferBackend.cpp:181 > > + unsigned sourceBytesPerRow = 4 * sourcePixelBuffer.size().width(); > > auto? > > > Source/WebCore/platform/graphics/ImageBufferBackend.cpp:182 > > + const uint8_t* sourceRows = sourcePixelBuffer.data().data() + sourceRectClipped.y() * sourceBytesPerRow + sourceRectClipped.x() * 4; > > auto? > > > Source/WebCore/platform/graphics/ImageBufferBackend.cpp:187 > > + PixelBufferFormat sourceFormat = sourcePixelBuffer.format(); > > auto? I didn't ignore these by the way, they are fixed in a different way in my next change (https://bugs.webkit.org/show_bug.cgi?id=225841) and since that was already building, I figured I'd leave well enough alone on this one.