Commit 787d25a7 authored by Daniel Nicoara's avatar Daniel Nicoara Committed by Commit Bot

Update video overlay to use BGRA_8888 format

This format is better supported and is the default format used for
scanout buffer allocation.

Bug: b/74993970
Test: Ran on device and ensured buffer allocation doesn't fail.
Change-Id: I8743c9166e6ad41588418d10059fe2bac34fce35
Reviewed-on: https://chromium-review.googlesource.com/964893Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Daniel Nicoara <dnicoara@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543758}
parent c46d0c69
...@@ -25,11 +25,11 @@ class VideoOverlayFactory::Texture { ...@@ -25,11 +25,11 @@ class VideoOverlayFactory::Texture {
if (!gl) if (!gl)
return; return;
gpu_memory_buffer_ = gpu_factories_->CreateGpuMemoryBuffer( gpu_memory_buffer_ = gpu_factories_->CreateGpuMemoryBuffer(
gfx::Size(1, 1), gfx::BufferFormat::RGBA_8888, gfx::Size(1, 1), gfx::BufferFormat::BGRA_8888,
gfx::BufferUsage::SCANOUT); gfx::BufferUsage::SCANOUT);
if (gpu_memory_buffer_) { if (gpu_memory_buffer_) {
image_id_ = gl->CreateImageCHROMIUM(gpu_memory_buffer_->AsClientBuffer(), image_id_ = gl->CreateImageCHROMIUM(gpu_memory_buffer_->AsClientBuffer(),
1, 1, GL_RGBA); 1, 1, GL_BGRA_EXT);
} }
if (image_id_) { if (image_id_) {
gl->GenTextures(1, &texture_id_); gl->GenTextures(1, &texture_id_);
......
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