Bug 225813 - Use PixelBufferFormat to specify ImageBuffer::getPixelBuffer destination format allowing for more control over data conversion
Summary: Use PixelBufferFormat to specify ImageBuffer::getPixelBuffer destination form...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
Depends on:
Blocks: 225140
  Show dependency treegraph
 
Reported: 2021-05-14 10:15 PDT by Sam Weinig
Modified: 2021-05-15 09:51 PDT (History)
14 users (show)

See Also:


Attachments
Patch (72.78 KB, patch)
2021-05-14 10:42 PDT, Sam Weinig
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (72.79 KB, patch)
2021-05-14 11:28 PDT, Sam Weinig
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (72.25 KB, patch)
2021-05-14 12:15 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (72.28 KB, patch)
2021-05-14 12:58 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2021-05-14 10:15:37 PDT
Use PixelBufferFormat to specify ImageBuffer::getPixelData destination format allowing for more control over data conversion
Comment 1 Sam Weinig 2021-05-14 10:42:56 PDT Comment hidden (obsolete)
Comment 2 Sam Weinig 2021-05-14 11:28:25 PDT Comment hidden (obsolete)
Comment 3 Sam Weinig 2021-05-14 12:15:15 PDT Comment hidden (obsolete)
Comment 4 Sam Weinig 2021-05-14 12:58:17 PDT
Created attachment 428647 [details]
Patch
Comment 5 Darin Adler 2021-05-14 15:40:10 PDT
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?
Comment 6 EWS 2021-05-14 18:00:06 PDT
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].
Comment 7 Radar WebKit Bug Importer 2021-05-14 18:01:18 PDT
<rdar://problem/78040673>
Comment 8 Sam Weinig 2021-05-15 09:51:14 PDT
(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.