| Index: src/utils/SkTextureCompressor.h
|
| diff --git a/src/utils/SkTextureCompressor.h b/src/utils/SkTextureCompressor.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..38fb5eade2904e0a64a64d02e8dac0e5ce3c4239
|
| --- /dev/null
|
| +++ b/src/utils/SkTextureCompressor.h
|
| @@ -0,0 +1,31 @@
|
| +/*
|
| + * Copyright 2014 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#ifndef SkTextureCompressor_DEFINED
|
| +#define SkTextureCompressor_DEFINED
|
| +
|
| +class SkBitmap;
|
| +class SkData;
|
| +
|
| +namespace SkTextureCompressor {
|
| + // Various texture compression formats that we support.
|
| + enum Format {
|
| + // Alpha only format.
|
| + kLATC_Format,
|
| +
|
| + kLast_Format = kLATC_Format
|
| + };
|
| + static const int kFormatCnt = kLast_Format + 1;
|
| +
|
| + // Returns an SkData holding a blob of compressed data that corresponds
|
| + // to the bitmap. If the bitmap colorType cannot be compressed using the
|
| + // associated format, then we return NULL. The caller is responsible for
|
| + // calling unref() on the returned data.
|
| + SkData* CompressBitmapToFormat(const SkBitmap& bitmap, Format format);
|
| +}
|
| +
|
| +#endif
|
|
|