Skip to content

Commit

Permalink
Disable some formats on the Android VideoFrame CopyTexImage path.
Browse files Browse the repository at this point in the history
These formats seem to fail with the passthrough command decoder, but
since there's not a good way to tell when we are on the validating
command decoder just disable them entirely on Android.

This also reverts https://crrev.com/857791 which did not resolve the
problems as was hoped.

Bug: 1181993
Change-Id: I9ff169c5f61ded273d79a3e49578b9d7c76d56e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2724975
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#859109}
  • Loading branch information
dalecurtis authored and Chromium LUCI CQ committed Mar 2, 2021
1 parent 51dfb5a commit bacc9ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 10 additions & 0 deletions media/renderers/paint_canvas_video_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1628,6 +1628,16 @@ bool PaintCanvasVideoRenderer::CopyVideoFrameYUVDataToGLTexture(
bool premultiply_alpha,
bool flip_y) {
DCHECK(raster_context_provider);
#if defined(OS_ANDROID)
// TODO(crbug.com/1181993): These formats don't work with the passthrough
// command decoder on Android for some reason.
const auto format_enum = static_cast<GLenum>(internal_format);
if (format_enum == GL_RGB10_A2 || format_enum == GL_RGB565 ||
format_enum == GL_RGB5_A1 || format_enum == GL_RGBA4) {
return false;
}
#endif

if (!video_frame->IsMappable()) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6030,16 +6030,12 @@ void WebGLRenderingContextBase::TexImageHelperMediaVideoFrame(
constexpr bool kAllowZeroCopyImages = true;
#endif

#if defined(OS_ANDROID)
#if defined(OS_ANDROID) || defined(OS_LINUX)
// TODO(crbug.com/1175907): Only TexImage2D seems to work with the GPU path on
// Android M -- appears to work fine on R, but to avoid regressions in <video>
// limit to TexImage2D only for now. Fails conformance test on Nexus 5X:
// conformance/textures/misc/texture-corner-case-videos.html
//
// TODO(crbug.com/1181993): Even TexImage2D doesn't seem to work reliably with
// the GPU path.
const bool function_supports_gpu_teximage = false;
#elif defined(OS_LINUX)
// TODO(crbug.com/1181562): TexSubImage2D via the GPU path performs poorly on
// Linux when used with ShMem GpuMemoryBuffer backed frames. We don't have a
// way to differentiate between true texture backed frames and ShMem GMBs, so
Expand Down

0 comments on commit bacc9ba

Please sign in to comment.