<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>91562</bug_id>
          
          <creation_ts>2012-07-17 17:19:31 -0700</creation_ts>
          <short_desc>[chromium] On Windows the compositor incorrectly flips videos</short_desc>
          <delta_ts>2012-07-18 15:20:29 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ananta Iyengar">ananta</reporter>
          <assigned_to name="Ananta Iyengar">ananta</assigned_to>
          <cc>cc-bugs</cc>
    
    <cc>enne</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>feature-media-reviews</cc>
    
    <cc>fischman</cc>
    
    <cc>jamesr</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>671780</commentid>
    <comment_count>0</comment_count>
    <who name="Ananta Iyengar">ananta</who>
    <bug_when>2012-07-17 17:19:31 -0700</bug_when>
    <thetext>This can be reproduced in Chromium with the command line switch --enable-accelerated-video-decode
which enables accelerated video decoding.

With this flag on, if you navigate to http://w3schools.com/html5/tryit.asp?filename=tryhtml5_video_all
you can see that the video is flipped.

The flipped flag needs to be set to false in the CCVideoLayerImpl::appendQuads function in the CCVideoLayerImpl.cpp
file.

Will upload a patch in a bit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>671825</commentid>
    <comment_count>1</comment_count>
      <attachid>152893</attachid>
    <who name="Ananta Iyengar">ananta</who>
    <bug_when>2012-07-17 18:03:21 -0700</bug_when>
    <thetext>Created attachment 152893
Initial patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>671829</commentid>
    <comment_count>2</comment_count>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2012-07-17 18:06:04 -0700</bug_when>
    <thetext>What changed from https://bugs.webkit.org/show_bug.cgi?id=89189#c10? Was that just incorrect?

Also, that&apos;s unfortunate that there aren&apos;t any tests for hardware decode.  Why is that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>671836</commentid>
    <comment_count>3</comment_count>
    <who name="Ananta Iyengar">ananta</who>
    <bug_when>2012-07-17 18:09:53 -0700</bug_when>
    <thetext>No tests as yet as it is still under development and is manually enabled in Chrome via command line switches. Tests will come in soon hopefully.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>671846</commentid>
    <comment_count>4</comment_count>
    <who name="Ananta Iyengar">ananta</who>
    <bug_when>2012-07-17 18:16:50 -0700</bug_when>
    <thetext>The elif defined(OS_WINDOWS) in that patch was wrong. For webkit we need to use OS(WINDOWS)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>671849</commentid>
    <comment_count>5</comment_count>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2012-07-17 18:19:31 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; The elif defined(OS_WINDOWS) in that patch was wrong. For webkit we need to use OS(WINDOWS)

How did this work when you tested it locally, then?

(In reply to comment #3)
&gt; No tests as yet as it is still under development and is manually enabled in Chrome via command line switches. Tests will come in soon hopefully.

Sorry to be reluctant, but I&apos;m frustrated that this never worked.  If we had had tests in the first place, there&apos;d be no need for this patch.

It seems like it shouldn&apos;t be that hard to add at least one layout test that draws a video with this patch.

You could either explicitly enable the hardware video path via a new function in Chromium&apos;s LayoutTestController.cpp (look for how we handle loseCompositorContext as an example).  Alternatively, you could create a (hypothetical) LayoutTests/platform/chromium/compositing/hardwarevideo/ directory and then modify TestShell::runFileTest to set these flags on anything in that directory.

Then I think you could just take a basic video layout test and run it through the hardware path.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>671859</commentid>
    <comment_count>6</comment_count>
    <who name="Ananta Iyengar">ananta</who>
    <bug_when>2012-07-17 18:37:26 -0700</bug_when>
    <thetext>On Windows the VDA code uses the Microsoft media foundation API which brings with it COM and a dependency on Windows 7.

I agree that we need tests for this. I think a better place for this would be in content shell or something similar in Chromium where we can exercise this end to end. We have a basic test for the VDA stuff in the form of video_decode_accelerator_unittest.cc under src\content\common\gpu\media.

It would be great if we could land this patch. In any case this feature will not be enabled with comprehensive tests in place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>671871</commentid>
    <comment_count>7</comment_count>
    <who name="Ananta Iyengar">ananta</who>
    <bug_when>2012-07-17 18:58:02 -0700</bug_when>
    <thetext>Based on a discussion with Ami Fischman logged a webkit bug here https://bugs.webkit.org/show_bug.cgi?id=91569</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>671893</commentid>
    <comment_count>8</comment_count>
      <attachid>152893</attachid>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2012-07-17 19:34:55 -0700</bug_when>
    <thetext>Comment on attachment 152893
Initial patch

R=me.  Thanks for filing the bug about tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>672831</commentid>
    <comment_count>9</comment_count>
      <attachid>152893</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-07-18 15:20:16 -0700</bug_when>
    <thetext>Comment on attachment 152893
Initial patch

Clearing flags on attachment: 152893

Committed r123029: &lt;http://trac.webkit.org/changeset/123029&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>672832</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-07-18 15:20:29 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>152893</attachid>
            <date>2012-07-17 18:03:21 -0700</date>
            <delta_ts>2012-07-18 15:20:16 -0700</delta_ts>
            <desc>Initial patch</desc>
            <filename>mypatch.txt</filename>
            <type>text/plain</type>
            <size>1640</size>
            <attacher name="Ananta Iyengar">ananta</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDEyMjkwNikKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBACisyMDEyLTA3LTE3ICBBbmFudGFu
YXJheWFuYW4gRyBJeWVuZ2FyICA8YW5hbnRhQGNocm9taXVtLm9yZz4KKworICAgICAgICBbY2hy
b21pdW1dIEVuc3VyZSB0aGF0IHRoZSBjb21wb3NpdG9yIGNvZGUgd2hpY2ggaXMgYXdhcmUgb2Yg
ZmxpcHBlZCBzdGF0dXMgb2YgdmlkZW8tdGV4dHVyZXMKKyAgICAgICAgcGVyIHBsYXRmb3JtIHNl
dHMgdGhlIGZsaXBwZWQgYml0IHRvIGZhbHNlIG9uIFdpbmRvd3MuCisgICAgICAgIGh0dHBzOi8v
YnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD05MTU2MgorICAgICAgICAKKyAgICAgICAg
UmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgTm8gbmV3IHRlc3RzLiAoSFcg
dmlkZW8gZGVjb2RlIGlzIHN0aWx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aWYgT1MoV0lORE9XUykKLSAgICAg
ICAgYm9vbCBmbGlwcGVkID0gdHJ1ZTsgLy8gVW5kZXIgdGhlIGNvdmVycywgaW1wbGVtZW50ZWQg
YnkgRFhWQS4KKyAgICAgICAgYm9vbCBmbGlwcGVkID0gZmFsc2U7IC8vIFVuZGVyIHRoZSBjb3Zl
cnMsIGltcGxlbWVudGVkIGJ5IERYVkEuCiAjZWxzZQogICAgICAgICBib29sIGZsaXBwZWQgPSBm
YWxzZTsgLy8gTGliVkEgKGNyb3MvaW50ZWwpLCBNYWNPUy4KICNlbmRpZgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>