Commit c52df073 authored by Dean Liao's avatar Dean Liao Committed by Commit Bot

media/gpu: format_utils: Log unsupported format.

Log unsupported BufferFormat and VideoPixelFormat to
facilitate debugging.

BUG=None
TEST=Noe

Change-Id: I3b38a5c5a3cff91464d30ada4c6a09485f576006
Reviewed-on: https://chromium-review.googlesource.com/c/1354739
Commit-Queue: Shuo-Peng Liao <deanliao@google.com>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612118}
parent dd32b5d4
......@@ -357,6 +357,7 @@ source_set("common") {
"//base",
"//media",
"//ui/gfx:buffer_types",
"//ui/gfx:memory_buffer",
"//ui/gfx/geometry",
]
}
......
......@@ -4,6 +4,7 @@
#include "media/gpu/format_utils.h"
#include "base/logging.h"
#include "ui/gfx/buffer_format_util.h"
namespace media {
......@@ -30,7 +31,8 @@ VideoPixelFormat GfxBufferFormatToVideoPixelFormat(gfx::BufferFormat format) {
return PIXEL_FORMAT_NV12;
default:
LOG(FATAL) << "Add more cases as needed";
LOG(FATAL) << "Unsupported BufferFormat: "
<< gfx::BufferFormatToString(format);
return PIXEL_FORMAT_UNKNOWN;
}
}
......@@ -51,7 +53,7 @@ gfx::BufferFormat VideoPixelFormatToGfxBufferFormat(
return gfx::BufferFormat::YUV_420_BIPLANAR;
default:
LOG(FATAL) << "Add more cases as needed";
LOG(FATAL) << "Unsupported VideoPixelFormat: " << pixel_format;
return gfx::BufferFormat::BGRX_8888;
}
}
......
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