• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 Google LLC
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef skgpu_geom_VectorTypes_DEFINED
9 #define skgpu_geom_VectorTypes_DEFINED
10 
11 #include "experimental/graphite/include/GraphiteTypes.h"
12 
13 namespace skgpu {
14 
15 // Use familiar type names from SkSL.
16 template<int N> using vec = skvx::Vec<N, float>;
17 using float2 = vec<2>;
18 using float4 = vec<4>;
19 
20 template<int N> using ivec = skvx::Vec<N, int32_t>;
21 using int2 = ivec<2>;
22 using int4 = ivec<4>;
23 
24 template<int N> using uvec = skvx::Vec<N, uint32_t>;
25 using uint2 = uvec<2>;
26 using uint4 = uvec<4>;
27 
28 };  // namespace skgpu
29 
30 #endif // skgpu_geom_VectorTypes_DEFINED
31 
32