forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media/gpu/v4l2: fix v4l2 VDA/VEA comment on choosing Unretained(this).
v4l2 VDA/VEA use Unretained(this) to create error callback and frame ready callback for v4l2 IP. It is safe, however, the reason is not simply because |this| outlives v4l2 IP. It is safe because functions to execute ErrorCB and FrameReadyCB are bound with V4L2ImageProcessor's weak pointer. Due to it, they will not be called after V4L2ImageProcessor is destructed. Since V4L2 VEA/VDA are outlive V4L2ImageProcessor, base::Unretained(this) is safe for those callbacks. Also, rename v4l2 IP member: child_task_runner_ to client_task_runner_ because it is not always referred as task runner of child_thread, which has special meaning (GPU main thread). Add a type ErrorCB in ImageProcessor interface and express that it is expected to be set in ImageProcessor subclass's factory method. BUG=917310 TEST=run VDA test on elm; run VEA test on peach_pit Change-Id: Ie89f449bc03b2e610429ce6a0cc8a05312145a44 Reviewed-on: https://chromium-review.googlesource.com/c/1390029 Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Commit-Queue: Shuo-Peng Liao <deanliao@google.com> Cr-Commit-Position: refs/heads/master@{#618903}
- Loading branch information
Dean Liao
authored and
Commit Bot
committed
Dec 26, 2018
1 parent
2112209
commit b98dfa1
Showing
5 changed files
with
87 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters