<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:achristensen@apple.com" title="Alex Christensen <achristensen@apple.com>"> <span class="fn">Alex Christensen</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [WinCairo] Support more video formats."
href="https://bugs.webkit.org/show_bug.cgi?id=152890">bug 152890</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #268541 Flags</td>
<td>review?
</td>
<td>review-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [WinCairo] Support more video formats."
href="https://bugs.webkit.org/show_bug.cgi?id=152890#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [WinCairo] Support more video formats."
href="https://bugs.webkit.org/show_bug.cgi?id=152890">bug 152890</a>
from <span class="vcard"><a class="email" href="mailto:achristensen@apple.com" title="Alex Christensen <achristensen@apple.com>"> <span class="fn">Alex Christensen</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=268541&action=diff" name="attach_268541" title="Patch">attachment 268541</a> <a href="attachment.cgi?id=268541&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=268541&action=review">https://bugs.webkit.org/attachment.cgi?id=268541&action=review</a>
Functionality looks good, there are just a few optimizations and reorganizations we need to do.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:124
> + static HashSet<String> cachedTypes;</span >
Use NeverDestroyed instead of static. Also, you should probably make this in a separate function like gstreamer's mimeTypeCache(), except have it just return a reference, not a whole HashSet.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:134
> + HRESULT hr = MFGetSupportedMimeTypesPtr()(&propVarMimeTypeArray);</span >
This will crash on WindowsXP. I don't think that's a problem, because we don't support XP any more.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:156
> + HashSet<String> types;
> + getSupportedTypes(types);</span >
We should't copy the whole HashSet every time we want to check if one type is supported.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:158
> + for (HashSet<String>::iterator it = types.begin(); it != types.end(); ++it) {</span >
This is what HashSet.contains is for. No need to iterate.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>