| 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 |
| 11 #include "SkImageInfo.h" | 11 #include "SkImageInfo.h" |
| 12 #include "SkBlitter.h" | |
| 13 | 12 |
| 14 class SkBitmap; | 13 class SkBitmap; |
| 14 class SkBlitter; |
| 15 class SkData; | 15 class SkData; |
| 16 | 16 |
| 17 namespace SkTextureCompressor { | 17 namespace SkTextureCompressor { |
| 18 // Various texture compression formats that we support. | 18 // Various texture compression formats that we support. |
| 19 enum Format { | 19 enum Format { |
| 20 // Alpha only formats. | 20 // Alpha only formats. |
| 21 kLATC_Format, // 4x4 blocks, (de)compresses A8 | 21 kLATC_Format, // 4x4 blocks, (de)compresses A8 |
| 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 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // Returns the desired dimensions of the block size for the given format. Th
ese dimensions | 82 // 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 | 83 // 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 | 84 // 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 | 85 // 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 | 86 // returned. If the flag is false, then these dimensions reflect the appropr
iate operable |
| 87 // dimensions of the compression functions. | 87 // dimensions of the compression functions. |
| 88 void GetBlockDimensions(Format format, int* dimX, int* dimY, bool matchSpec
= false); | 88 void GetBlockDimensions(Format format, int* dimX, int* dimY, bool matchSpec
= false); |
| 89 } | 89 } |
| 90 | 90 |
| 91 #endif | 91 #endif |
| OLD | NEW |