Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/utils/SkTextureCompressor.h

Issue 444093002: - Add astcbitmap to gm slides (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Decode trits/quints into temp buffers Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkTextureCompressor_DEFINED 8 #ifndef SkTextureCompressor_DEFINED
9 #define SkTextureCompressor_DEFINED 9 #define SkTextureCompressor_DEFINED
10 10
(...skipping 11 matching lines...) Expand all
22 kR11_EAC_Format, // 4x4 blocks, (de)compresses A8 22 kR11_EAC_Format, // 4x4 blocks, (de)compresses A8
23 23
24 // RGB only formats 24 // RGB only formats
25 kETC1_Format, // 4x4 blocks, compresses RGB 565, decompresses 8-bi t RGB 25 kETC1_Format, // 4x4 blocks, compresses RGB 565, decompresses 8-bi t RGB
26 // NOTE: ETC1 supports 8-bit RGB compression, but we 26 // NOTE: ETC1 supports 8-bit RGB compression, but we
27 // currently don't have any RGB8 SkColorTypes. We could 27 // currently don't have any RGB8 SkColorTypes. We could
28 // support 8-bit RGBA but we would have to prepro cess the 28 // support 8-bit RGBA but we would have to prepro cess the
29 // bitmap to insert alphas. 29 // bitmap to insert alphas.
30 30
31 // Multi-purpose formats 31 // Multi-purpose formats
32 kASTC_4x4_Format, // 4x4 blocks, no compression, decompresses RGBA
33 kASTC_5x4_Format, // 5x4 blocks, no compression, decompresses RGBA
34 kASTC_5x5_Format, // 5x5 blocks, no compression, decompresses RGBA
35 kASTC_6x5_Format, // 6x5 blocks, no compression, decompresses RGBA
36 kASTC_6x6_Format, // 6x6 blocks, no compression, decompresses RGBA
37 kASTC_8x5_Format, // 8x5 blocks, no compression, decompresses RGBA
38 kASTC_8x6_Format, // 8x6 blocks, no compression, decompresses RGBA
39 kASTC_8x8_Format, // 8x8 blocks, no compression, decompresses RGBA
40 kASTC_10x5_Format, // 10x5 blocks, no compression, decompresses RGBA
41 kASTC_10x6_Format, // 10x6 blocks, no compression, decompresses RGBA
42 kASTC_10x8_Format, // 10x8 blocks, no compression, decompresses RGBA
43 kASTC_10x10_Format, // 10x10 blocks, no compression, decompresses RGBA
44 kASTC_12x10_Format, // 12x10 blocks, no compression, decompresses RGBA
32 kASTC_12x12_Format, // 12x12 blocks, compresses A8, decompresses RGBA 45 kASTC_12x12_Format, // 12x12 blocks, compresses A8, decompresses RGBA
33 46
34 kLast_Format = kASTC_12x12_Format 47 kLast_Format = kASTC_12x12_Format
35 }; 48 };
36 static const int kFormatCnt = kLast_Format + 1; 49 static const int kFormatCnt = kLast_Format + 1;
37 50
38 // Returns the size of the compressed data given the width, height, and 51 // Returns the size of the compressed data given the width, height, and
39 // desired compression format. If the width and height are not an appropriat e 52 // desired compression format. If the width and height are not an appropriat e
40 // multiple of the block size, then this function returns an error (-1). 53 // multiple of the block size, then this function returns an error (-1).
41 int GetCompressedDataSize(Format fmt, int width, int height); 54 int GetCompressedDataSize(Format fmt, int width, int height);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Returns the desired dimensions of the block size for the given format. Th ese dimensions 95 // Returns the desired dimensions of the block size for the given format. Th ese dimensions
83 // don't necessarily correspond to the specification's dimensions, since the re may 96 // don't necessarily correspond to the specification's dimensions, since the re may
84 // be specialized algorithms that operate on multiple blocks at once. If the 97 // be specialized algorithms that operate on multiple blocks at once. If the
85 // flag 'matchSpec' is true, then the actual dimensions from the specificati on are 98 // flag 'matchSpec' is true, then the actual dimensions from the specificati on are
86 // returned. If the flag is false, then these dimensions reflect the appropr iate operable 99 // returned. If the flag is false, then these dimensions reflect the appropr iate operable
87 // dimensions of the compression functions. 100 // dimensions of the compression functions.
88 void GetBlockDimensions(Format format, int* dimX, int* dimY, bool matchSpec = false); 101 void GetBlockDimensions(Format format, int* dimX, int* dimY, bool matchSpec = false);
89 } 102 }
90 103
91 #endif 104 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698