|
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
Committed: https://crrev.com/a2a2970d72e7856444896600874fca9594f55437
Cr-Commit-Position: refs/heads/master@{#314200}
Total comments: 4
Total comments: 5
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+197 lines, -71 lines) |
Patch |
|
M |
cc/layers/video_layer_impl.cc
|
View
|
1
|
1 chunk |
+3 lines, -9 lines |
0 comments
|
Download
|
|
M |
cc/output/gl_renderer.cc
|
View
|
1
2
3
|
4 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/renderer_pixeltest.cc
|
View
|
1
2
3
|
5 chunks |
+123 lines, -16 lines |
0 comments
|
Download
|
|
M |
cc/output/shader.h
|
View
|
1
|
4 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/shader.cc
|
View
|
1
2
3
|
6 chunks |
+23 lines, -11 lines |
0 comments
|
Download
|
|
M |
cc/quads/draw_quad_unittest.cc
|
View
|
1
|
4 chunks |
+13 lines, -25 lines |
0 comments
|
Download
|
|
M |
cc/quads/yuv_video_draw_quad.h
|
View
|
1
2
3
|
3 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/quads/yuv_video_draw_quad.cc
|
View
|
1
|
5 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/test/data/yuv_stripes_offset.png
|
View
|
1
|
Binary file |
0 comments
|
Download
|
|
M |
cc/test/render_pass_test_common.cc
|
View
|
1
|
1 chunk |
+4 lines, -10 lines |
0 comments
|
Download
|
|
M |
content/common/cc_messages.h
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
content/common/cc_messages_unittest.cc
|
View
|
1
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
mojo/converters/surfaces/surfaces_type_converters.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 14 (3 generated)
|