Commit a3287e45 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/test: Make GL context current in FrameRendererThumbnail

It is needed that a thread has made GL context current before
FrameRendererThumbnail::CreateVideoFrame() is called. Otherwise,
the gl functions called in CreateTexture() causes a segmentation
fault. But the test code doesn't fulfill this if it runs with
VaapiVDA.

This fixes the issue by making GL context current in
FrameRendererThumbnail::CreateVideoFrame().

Bug: 1037926
Test: VDA test on guado
Change-Id: I41e9778886d205196038deac17c1a84cc0874635
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985738
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728758}
parent 1a822edf
...@@ -225,6 +225,9 @@ scoped_refptr<VideoFrame> FrameRendererThumbnail::CreateVideoFrame( ...@@ -225,6 +225,9 @@ scoped_refptr<VideoFrame> FrameRendererThumbnail::CreateVideoFrame(
uint32_t* texture_id) { uint32_t* texture_id) {
DCHECK_CALLED_ON_VALID_SEQUENCE(renderer_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(renderer_sequence_checker_);
// Make the GL context current in the case it's not currently yet.
AcquireGLContext();
// Create a mailbox. // Create a mailbox.
gpu::Mailbox mailbox = gpu::Mailbox::Generate(); gpu::Mailbox mailbox = gpu::Mailbox::Generate();
gpu::MailboxHolder mailbox_holders[media::VideoFrame::kMaxPlanes]; gpu::MailboxHolder mailbox_holders[media::VideoFrame::kMaxPlanes];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment