This can conceal real bugs. Tests should be fixed so they don't risk calling
getPixel in invalid states instead.
Differential Revision: https://phabricator.services.mozilla.com/D9100
--HG--
extra : moz-landing-system : lando
It was supporting a simpler case of only drawing in the upper left corner of
the input canvas. This supports that by default still, but also allows the
caller to exactly specify coordinates and size of the rectangle to draw.
MozReview-Commit-ID: GVQh0HqejqU
--HG--
extra : rebase_source : fb48fd1681f0545c53b5cb49b2791f42270ca83c
Our previous strategy was to draw the *entire* video we wanted a pixel from to
a canvas, then extract the pixel we wanted from that. This was all right for
most of our cases where the video was sufficiently small.
However, drawImage is more powerful than that -- we really just need a 1x1
canvas and draw the pixel we want to look at straight in.
MozReview-Commit-ID: ATdFVY3YBUv
--HG--
extra : rebase_source : 47ce69d7d9fd6505d2991895d4484fcc1f746543
This moves those two functions from a single test to a VideoStreamHelper in a
common file, so they can be used when checking video flow in multiple tests.
It also implements a VideoFrameEmitter that provides tests with an easy to
access video source where VideoStreamHelper can verify flow on the sink.
MozReview-Commit-ID: Fin9eiVmBe
--HG--
extra : rebase_source : 8b62124b0182d7e7bd78788e031b2d2259db9e57
Otherwise we'd risk reading old pixels in case we draw something
transparent.
MozReview-Commit-ID: LjNXE4Rmrmt
--HG--
extra : rebase_source : 229c883e362cc9e1d7b49479e46b01bbab329a46
We used to fully guarantee the order of requestFrame() and draw calls.
For instance:
```
ctx.draw(red);
stream.requestFrame();
ctx.draw(green);
```
would guarantee that a red frame ended up in the stream, and not the
green unless another frame was requested.
Now with frames being requested and pushed out on next refresh, we can
only guarantee that everything up to the requestFrame() call is included
in the next frame. Everything after the requestFrame() and before the
next refresh (stable state in most cases) will now also be inevitably
included.
--HG--
extra : transplant_source : %DF%A1%9C%A8%2B%3AzTS%EA%CE%0A%023%E2%EBWC%FD%3C