|
|
gpu video: optimize HW video to SW canvas and implement it for WebRTC.
Currently, very complicated callback mechanism is used to copy HW video to SW
canvas in SkCanvasVideoRenderer. When Blink thread needs to readback HW video,
the readback callback of VideoFrame is called, and then readback is executed in the
media thread using gl context belonging to gpu decoder.
It has two bad points:
1. Blink thread is blocked until the media thread gets readback done.
2. It's not implemented yet for WebRTC HW Video to be drawn on SW Canvas.
In detail for #2, VideoCaptureImpl creates a texture VideoFrame using the
mailbox made in browser process. VideoCaptureImpl doesn't use any gl context so
the readback callback is not implemented. Now the callback is removed.
This CL implements drawing HW Video on SW SkCanvas in SkCanvasVideoRenderer, so
two bad points are resolved.
1. SkCanvasVideoRenderer draws HW Video on SW SkCanvas in Blink thread without
interaction with the media thread.
2. WebRTC impl (i.e. VideoCaptureImpl) doesn't need to do anything because
SkCanvasVideoRenderer has all logic to draw HW Video on SW SkCanvas.
TEST=blink layout test virtual/gpu/fast/canvas/yuv-video-on-accelerated-canvas.html
BUG= 401058
Committed: https://crrev.com/16e17206be4635966d3ee5a4bf28bcce9cde5d3f
Cr-Commit-Position: refs/heads/master@{#315819}
Total comments: 6
Total comments: 8
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+86 lines, -219 lines) |
Patch |
 |
M |
cc/resources/video_resource_updater.cc
|
View
|
1
2
3
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_unittest_context.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/capture/desktop_capture_device_aura.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_controller_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_view_browsertest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/media/android/webmediaplayer_android.cc
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/renderer_gpu_video_accelerator_factories.h
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/renderer_gpu_video_accelerator_factories.cc
|
View
|
1
2
3
|
2 chunks |
+0 lines, -50 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/rtc_video_decoder.cc
|
View
|
1
2
3
|
2 chunks |
+0 lines, -28 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/video_capture_impl.cc
|
View
|
1
2
3
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/webmediaplayer_ms.cc
|
View
|
1
2
3
|
4 chunks |
+19 lines, -5 lines |
0 comments
|
Download
|
 |
M |
media/base/video_frame.h
|
View
|
1
2
3
|
4 chunks |
+0 lines, -15 lines |
0 comments
|
Download
|
 |
M |
media/base/video_frame.cc
|
View
|
1
2
3
|
3 chunks |
+0 lines, -14 lines |
0 comments
|
Download
|
 |
M |
media/base/video_frame_unittest.cc
|
View
|
1
2
3
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
media/filters/gpu_video_accelerator_factories.h
|
View
|
|
2 chunks |
+0 lines, -8 lines |
0 comments
|
Download
|
 |
M |
media/filters/gpu_video_decoder.cc
|
View
|
1
2
3
|
3 chunks |
+0 lines, -29 lines |
0 comments
|
Download
|
 |
M |
media/filters/mock_gpu_video_accelerator_factories.h
|
View
|
|
2 chunks |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
media/filters/skcanvas_video_renderer.h
|
View
|
1
2
3
|
2 chunks |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
media/filters/skcanvas_video_renderer.cc
|
View
|
1
2
3
|
5 chunks |
+48 lines, -41 lines |
0 comments
|
Download
|
 |
M |
media/filters/skcanvas_video_renderer_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 32 (9 generated)
|