• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 SkTextureCompressionType_DEFINED
9 #define SkTextureCompressionType_DEFINED
10 /*
11  *   Skia                | GL_COMPRESSED_*     | MTLPixelFormat*      | VK_FORMAT_*_BLOCK
12  *  --------------------------------------------------------------------------------------
13  *   kETC2_RGB8_UNORM    | ETC1_RGB8           | ETC2_RGB8 (iOS-only) | ETC2_R8G8B8_UNORM
14  *                       | RGB8_ETC2           |                      |
15  *  --------------------------------------------------------------------------------------
16  *   kBC1_RGB8_UNORM     | RGB_S3TC_DXT1_EXT   | N/A                  | BC1_RGB_UNORM
17  *  --------------------------------------------------------------------------------------
18  *   kBC1_RGBA8_UNORM    | RGBA_S3TC_DXT1_EXT  | BC1_RGBA (macOS-only)| BC1_RGBA_UNORM
19  */
20 enum class SkTextureCompressionType {
21     kNone,
22     kETC2_RGB8_UNORM,
23 
24     kBC1_RGB8_UNORM,
25     kBC1_RGBA8_UNORM,
26     kASTC_RGBA8_4x4,
27     kASTC_RGBA8_6x6,
28     kASTC_RGBA8_8x8,
29     kLast = kASTC_RGBA8_8x8,
30     kETC1_RGB8 = kETC2_RGB8_UNORM,
31 };
32 
33 #endif
34