Index: src/utils/SkTextureCompressor.h |
diff --git a/src/utils/SkTextureCompressor.h b/src/utils/SkTextureCompressor.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..83bdf160bcd8b53f8b0c300ddb92743878523330 |
--- /dev/null |
+++ b/src/utils/SkTextureCompressor.h |
@@ -0,0 +1,30 @@ |
+/* |
+ * 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 |
robertphillips
2014/06/09 19:50:18
pixelConfig -> config ?
krajcevski
2014/06/09 20:39:34
Done.
|
+ // to the bitmap. If pixelConfig is not a compressed format, then this |
+ // function returns NULL. The returned SkData will have a refcount of one. |
+ SkData *CompressBitmapToFormat(const SkBitmap &bitmap, Format config); |
+} |
+ |
+#endif |