Commit 5b54989e authored by Daniel Cheng's avatar Daniel Cheng Committed by Commit Bot

//ui/gfx/mojo/buffer_types.mojom: Remove unnecessary _LAST enum values.

Mojo provides predefined kMaxValue for circumstances where these sorts
of values would be useful, so defining _LAST is redundant. In this case,
it's only used to handle the NOTREACHED() case in the enum traits; just
map the NOTREACHED() case to something arbitrary.

Change-Id: Ieaca8b83f051f75f64071542c6135a0ddaca8544
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1570735
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652445}
parent ffaa5f9d
......@@ -23,8 +23,6 @@ enum BufferFormat {
YVU_420,
YUV_420_BIPLANAR,
UYVY_422,
LAST = UYVY_422
};
// gfx::BufferUsage
......@@ -36,8 +34,6 @@ enum BufferUsage {
SCANOUT_CPU_READ_WRITE,
SCANOUT_VDA_WRITE,
GPU_READ_CPU_READ_WRITE,
LAST = GPU_READ_CPU_READ_WRITE
};
struct BufferUsageAndFormat {
......
......@@ -49,7 +49,7 @@ struct EnumTraits<gfx::mojom::BufferFormat, gfx::BufferFormat> {
return gfx::mojom::BufferFormat::UYVY_422;
}
NOTREACHED();
return gfx::mojom::BufferFormat::LAST;
return gfx::mojom::BufferFormat::kMinValue;
}
static bool FromMojom(gfx::mojom::BufferFormat input,
......@@ -126,7 +126,7 @@ struct EnumTraits<gfx::mojom::BufferUsage, gfx::BufferUsage> {
return gfx::mojom::BufferUsage::GPU_READ_CPU_READ_WRITE;
}
NOTREACHED();
return gfx::mojom::BufferUsage::LAST;
return gfx::mojom::BufferUsage::kMinValue;
}
static bool FromMojom(gfx::mojom::BufferUsage input, gfx::BufferUsage* out) {
......
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