diff --git a/include/private/SkTLogic.h b/include/private/SkTLogic.h index 8cf8c284f1..542cb99dbc 100644 --- a/include/private/SkTLogic.h +++ b/include/private/SkTLogic.h @@ -41,6 +41,9 @@ template using result_of_t = typename std::result_of::type; template using common_type_t = typename std::common_type::type; +template using aligned_union_t + = typename std::aligned_union::type; + template struct index_sequence { using type = index_sequence; using value_type = std::size_t; diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp index 1ea98390ac..6db65fc6f5 100644 --- a/src/gpu/text/GrTextBlob.cpp +++ b/src/gpu/text/GrTextBlob.cpp @@ -223,9 +223,9 @@ sk_sp GrTextBlob::Make(int glyphCount, GrColor color, bool forceWForDistanceFields) { - size_t vertexSize = sizeof(std::aligned_union_t<0, Mask2DVertex, ARGB2DVertex>); + size_t vertexSize = sizeof(skstd::aligned_union_t<0, Mask2DVertex, ARGB2DVertex>); if (viewMatrix.hasPerspective() || forceWForDistanceFields) { - vertexSize = sizeof(std::aligned_union_t<0, SDFT3DVertex, ARGB3DVertex>); + vertexSize = sizeof(skstd::aligned_union_t<0, SDFT3DVertex, ARGB3DVertex>); } size_t quadSize = kVerticesPerGlyph * vertexSize;