Fix fix chrome build bots

Change-Id: I4b1a2a9c89db59a6a1674388f9ab220a2ec9a61c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258656
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
Herb Derby 2019-12-06 18:15:49 -05:00 committed by Skia Commit-Bot
parent 5da8e55bf4
commit 3d1a3bb4bb
2 changed files with 4 additions and 5 deletions

View File

@ -41,9 +41,6 @@ template <typename T> using result_of_t = typename std::result_of<T>::type;
template <typename... T> using common_type_t = typename std::common_type<T...>::type;
template <size_t size, typename... T> using aligned_union_t
= typename std::aligned_union<size, T...>::type;
template <std::size_t... Ints> struct index_sequence {
using type = index_sequence;
using value_type = std::size_t;

View File

@ -223,9 +223,11 @@ sk_sp<GrTextBlob> GrTextBlob::Make(int glyphCount,
GrColor color,
bool forceWForDistanceFields) {
size_t vertexSize = sizeof(skstd::aligned_union_t<0, Mask2DVertex, ARGB2DVertex>);
static_assert(sizeof(ARGB2DVertex) <= sizeof(Mask2DVertex));
size_t vertexSize = sizeof(Mask2DVertex);
if (viewMatrix.hasPerspective() || forceWForDistanceFields) {
vertexSize = sizeof(skstd::aligned_union_t<0, SDFT3DVertex, ARGB3DVertex>);
static_assert(sizeof(ARGB3DVertex) <= sizeof(SDFT3DVertex));
vertexSize = sizeof(SDFT3DVertex);
}
size_t quadSize = kVerticesPerGlyph * vertexSize;