Commit 5ff396a0 authored by Jeffrey Kardatzke's avatar Jeffrey Kardatzke Committed by Commit Bot

Change offscreen back texture initial size to 64x64

There was a bug on kukui where this code path would get hit and fail.
The minigbm allocation would succeed, but then attaching it to the FB
would fail because the mediatek DRM driver has a minimum width/height
requirement of 64 for the framebuffer. This buffer is just throwaway
and gets reallocated after the offscreen buffer gets swapped, so
allocating a slightly larger one should cause no problems and the
small increase wastes a negligible amount of memory.

This bug specifically manifested itself in Zoom in Chrome on kukui.

BUG=b:151774454
TEST=Zoom video renders on krane

Change-Id: I068273d971eb08a5ff7d5856ddfa4d9b8854b0b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2155381
Commit-Queue: J Kardatzke <jkardatzke@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760744}
parent e81821df
...@@ -4027,8 +4027,10 @@ gpu::ContextResult GLES2DecoderImpl::Initialize( ...@@ -4027,8 +4027,10 @@ gpu::ContextResult GLES2DecoderImpl::Initialize(
if (!offscreen_single_buffer_) { if (!offscreen_single_buffer_) {
// Allocate the offscreen saved color texture. // Allocate the offscreen saved color texture.
DCHECK(offscreen_saved_color_format_); DCHECK(offscreen_saved_color_format_);
// Use 64x64 instead of 1x1 to handle minimum framebuffer size
// requirement on some platforms: b/151774454
offscreen_saved_color_texture_->AllocateStorage( offscreen_saved_color_texture_->AllocateStorage(
gfx::Size(1, 1), offscreen_saved_color_format_, true); gfx::Size(64, 64), offscreen_saved_color_format_, true);
offscreen_saved_frame_buffer_->AttachRenderTexture( offscreen_saved_frame_buffer_->AttachRenderTexture(
offscreen_saved_color_texture_.get()); offscreen_saved_color_texture_.get());
......
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