OLD | NEW |
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // are. The typedef is not meant to be used by clients of the API, but rathe
r | 48 // are. The typedef is not meant to be used by clients of the API, but rathe
r |
49 // allows SIMD optimized compression functions to be implemented. | 49 // allows SIMD optimized compression functions to be implemented. |
50 typedef bool (*CompressionProc)(uint8_t* dst, const uint8_t* src, | 50 typedef bool (*CompressionProc)(uint8_t* dst, const uint8_t* src, |
51 int width, int height, int rowBytes); | 51 int width, int height, int rowBytes); |
52 | 52 |
53 // Returns the blitter for the given compression format. Note, the blitter | 53 // Returns the blitter for the given compression format. Note, the blitter |
54 // is intended to be used with the proper input. I.e. if you try to blit | 54 // is intended to be used with the proper input. I.e. if you try to blit |
55 // RGB source data into an R11 EAC texture, you're gonna have a bad time. | 55 // RGB source data into an R11 EAC texture, you're gonna have a bad time. |
56 SkBlitter* CreateBlitterForFormat(int width, int height, void* compressedBuf
fer, | 56 SkBlitter* CreateBlitterForFormat(int width, int height, void* compressedBuf
fer, |
57 Format format); | 57 Format format); |
| 58 |
| 59 // Returns the desired dimensions of the block size for the given format. Th
ese dimensions |
| 60 // don't necessarily correspond to the hardware-specified dimensions, since
there may |
| 61 // be specialized algorithms that operate on multiple blocks at once. These
dimensions |
| 62 // reflect that optimization and return the appropriate operable dimensions. |
| 63 void GetBlockDimensions(Format format, int* dimX, int* dimY); |
58 } | 64 } |
59 | 65 |
60 #endif | 66 #endif |
OLD | NEW |