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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 27 08:45:37 PDT 2016


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

--- Comment #4 from Frédéric Wang (:fredw) <fred.wang at free.fr> ---
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.

> 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.

> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:113
> +        if (!m_vector.tryReserveCapacity(m_size + n))

Same here.

> 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.

> 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()

-- 
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/641411be/attachment.html>


More information about the webkit-unassigned mailing list