[Webkit-unassigned] [Bug 162608] [GTK] Update WOFF2 decoder

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 27 10:01:07 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=162608

--- Comment #5 from Khaled Hosny <khaledhosny at eglug.org> ---
Comment on attachment 289945
  --> https://bugs.webkit.org/attachment.cgi?id=289945
Patch, v2

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

>> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:103
>> +        return Write(data, m_size, n);
> 
> I think this should be removed.

Good catch, I think it was a left over from previous trials.

>> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:104
>> +        if (!m_vector.tryReserveCapacity(m_size + n))
> 
> Is it needed? It seems that WTF::Vector::append already calls expandCapacity.

I’m not sure what is going on, but if I don’t do that decoding will always fail.

>> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:116
>> +        m_vector.insert(offset, static_cast<const char*>(data), n);
> 
> I wonder if it's possible to copy the data in one step.

I’m not sure if Vector has an API to do that, I didn’t seem to find any.

>> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:128
>> +    size_t m_size;
> 
> Do you really need this member? It seems that you can just use m_vector::size()

I removed it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160927/ec79ac43/attachment.html>


More information about the webkit-unassigned mailing list