<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:achristensen&#64;apple.com" title="Alex Christensen &lt;achristensen&#64;apple.com&gt;"> <span class="fn">Alex Christensen</span></a>
</span> changed
              <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>
        <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 #264880 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <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#c6">Comment # 6</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&#64;apple.com" title="Alex Christensen &lt;achristensen&#64;apple.com&gt;"> <span class="fn">Alex Christensen</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=264880&amp;action=diff" name="attach_264880" title="Patch">attachment 264880</a> <a href="attachment.cgi?id=264880&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=264880&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=264880&amp;action=review</a>

<a href="http://www.w3.org/2010/05/video/mediaevents.html">http://www.w3.org/2010/05/video/mediaevents.html</a> didn't draw in my debug build.  I'm sure this is very close to good, but r- because it needs a little more polishing.

<span class="quote">&gt; Source/WebCore/platform/graphics/win/MediaFoundationUtils.h:28
&gt; +const MFTIME oneSecond = 10000000; // One second in hns
&gt; +const LONG oneMsec = 1000; // One msec in hns </span >

I assume hns means hundred nanoseconds, in which case oneMsec should be 10000 hns, not 1000.  I also think these should have better names.

<span class="quote">&gt; Source/WebCore/platform/graphics/win/MediaFoundationUtils.h:1013
&gt; +//////////////////////////////////////////////////////////////////////////</span >

Probably not necessary.  This isn't done elsewhere in WebKit.

<span class="quote">&gt; Source/WebCore/platform/graphics/win/MediaFoundationUtils.h:1021
&gt; +    offset.fract = WORD(65536 * (v-offset.value));</span >

Give 65536 a name.  std::numeric_limits&lt;WORD&gt;::max() + 1
Here and in MFOffsetToFloat, which should probably be right next to this.

<span class="quote">&gt; Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:86
&gt; +static const GUID MFSamplePresenterSampleCounter =
&gt; +{ 0xb0bb83cc, 0xf10f, 0x4e2e, { 0xaa, 0x2b, 0x29, 0xea, 0x5e, 0x92, 0xef, 0x85 } };</span >

Where did these come from?

<span class="quote">&gt; Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:790
&gt; +    : m_refCount(0)</span >

Use m_refCount { 0 }; etc. in the header instead of having the default values here.

<span class="quote">&gt; Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:1861
&gt; +    if ((srcPAR.Numerator != destPAR.Numerator) || (srcPAR.Denominator != destPAR.Denominator)) {</span >

Is the greatest common factor of Numerator and Denominator always 1?  I think a better way to determine if two fractions are equal is to cross multiply.  That way 1/2 would be equal to 2/4

<span class="quote">&gt; Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:2155
&gt; +    ASSERT(MFGetAttributeUINT32(pSample, MFSamplePresenter_SampleCounter, (UINT32)-1) == m_TokenCounter);</span >

pSample -&gt; pSample.get()
MFSamplePresenter_SampleCounter -&gt; MFSamplePresenterSampleCounter
There are two other places where you have underscores in comments that don't exist in the variable names.

<span class="quote">&gt; Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:3437
&gt; +        ctxt-&gt;drawSurfaceToContext(image, rect, rect, context);</span >

This is where the magic happens!  Cool!

<span class="quote">&gt; Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:3454
&gt; +//-----------------------------------------------------------------------------
&gt; +// InitializeD3D
&gt; +// 
&gt; +// Initializes Direct3D and the Direct3D device manager.
&gt; +//-----------------------------------------------------------------------------</span >

Again, I don't think comments like this are necessary.</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>