Sub-task of bug 236754. We can simplify the rewrite of SourceBufferParserWebM by using SharedBuffers instead. Once we have built the SharedBuffer, we would want an easy way to convert it into a CMBlockBuffer without allocating memory or performing any copies.
<rdar://problem/89338447>
Created attachment 452960 [details] Patch
Created attachment 453063 [details] Patch
Comment on attachment 453063 [details] Patch Unrelated failure, that code path isn't even used yet.
Created attachment 453093 [details] Patch
Comment on attachment 453093 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453093&action=review > Source/WebCore/platform/SharedBuffer.cpp:162 > + if (element->segment->size() - offsetInSegment >= length) Is it possible for element->segment->size() to be < offsetInSegment? If not, maybe an ASSERT() that states such?
Comment on attachment 453093 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453093&action=review >> Source/WebCore/platform/SharedBuffer.cpp:162 >> + if (element->segment->size() - offsetInSegment >= length) > > Is it possible for element->segment->size() to be < offsetInSegment? If not, maybe an ASSERT() that states such? No, it's not possible. unless getSegmentForPosition is buggy and it's not :)
Created attachment 454038 [details] Patch
Committed r290968 (248147@main): <https://commits.webkit.org/248147@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 454038 [details].