Clamp YUV videos to their visible size in the shader

Video textures can be larger than the visible size of the video.
Because they have bilinear filtering turned on for them, if the video is
scaled, then the this means that the part of the texture outside of the
video itself can be sampled, causing odd visible artifacts like
hairlines on the side of the image.

To fix this, pass in a clamp value of half a pixel (because of bilinear
filtering) inside of the visible rect and clamp all texture coordinates
to this maximum value in the fragment shader.

BUG=429640

Review URL: https://codereview.chromium.org/881963002

Cr-Commit-Position: refs/heads/master@{#314200}


CrOS-Libchrome-Original-Commit: a2a2970d72e7856444896600874fca9594f55437
1 file changed
tree: a86a19a1ff1bea392f7758d15587d82e287eec61
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/