1 /* 2 * Copyright 2023 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_graphite_ReadWriteSwizzle_DEFINED 9 #define skgpu_graphite_ReadWriteSwizzle_DEFINED 10 11 namespace skgpu::graphite { 12 /** 13 * Enumerate the few possible read and write swizzle options for smaller storage. 14 */ 15 enum class ReadSwizzle { 16 kRGBA, // Default 17 kRGB1, 18 /* 000r is a possible read swizzle, but it is currently only expected for use with alpha-only 19 color types. As a result, the swizzle is concatenated with "aaaa", resulting in "rrrr". */ 20 kRRRR, 21 kRRR1, 22 kBGRA 23 }; 24 25 enum class WriteSwizzle { 26 kRGBA, // Default 27 kA000, 28 kBGRA, 29 }; 30 31 } // namespace skgpu::graphite 32 33 #endif // skgpu_graphite_ReadWriteSwizzle_DEFINED 34