<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [WinCairo][Video][MediaFoundation] Video should be rendered in provided graphics context."
href="https://bugs.webkit.org/show_bug.cgi?id=150941#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [WinCairo][Video][MediaFoundation] Video should be rendered in provided graphics context."
href="https://bugs.webkit.org/show_bug.cgi?id=150941">bug 150941</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=264880&action=diff" name="attach_264880" title="Patch">attachment 264880</a> <a href="attachment.cgi?id=264880&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=264880&action=review">https://bugs.webkit.org/attachment.cgi?id=264880&action=review</a>
<span class="quote">> Source/WebCore/platform/graphics/win/MediaFoundationUtils.h:9
> +#define CheckPointer(x, hr) if (x == nullptr) { return hr; }</span >
WebKit style: if (!x)
Also, I think this macro isn't good. Just have lots of early returns. That'll make it more clear and consistent with the rest of WebKit.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaFoundationUtils.h:82
> + return m_pType != nullptr;</span >
Again, no comparing with nullptr. !!m_pType
<span class="quote">> Source/WebCore/platform/graphics/win/MediaFoundationUtils.h:87
> + assert(IsValid());</span >
ASSERT here and elsewhere.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaFoundationUtils.h:100
> + : m_pType(nullptr)
> + {
> + if (pType) {
> + m_pType = pType;
> + m_pType->AddRef();
> + }</span >
This is strange. I'd prefer this:
: m_pType(pType)
{
if (m_pType)
m_pType->AddRef();
}
<span class="quote">> Source/WebCore/platform/graphics/win/MediaFoundationUtils.h:104
> + // Copy ctor
> + MediaType(const MediaType& mt)</span >
Comments like this not needed.
<span class="quote">> Source/WebCore/platform/graphics/win/MediaFoundationUtils.h:1133
> +template<class T>
> +class AsyncCallback : public IMFAsyncCallback {</span >
This is cool, but it's only used once. Is it always called on the main thread, or do we need Locks when using this?</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>