Index: include/pdf/SkPDFCallbacks.h |
diff --git a/include/pdf/SkPDFCallbacks.h b/include/pdf/SkPDFCallbacks.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1cf3232f5d5312075b95a2de3c0605c10905da02 |
--- /dev/null |
+++ b/include/pdf/SkPDFCallbacks.h |
@@ -0,0 +1,30 @@ |
+ |
+/* |
+ * Copyright 2013 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+ |
+#ifndef SkPDFCallbacks_DEFINED |
+#define SkPDFCallbacks_DEFINED |
+ |
+class SkBitmap; |
+class SkIRect; |
+class SkWStream; |
+ |
+/** EncodeToDCTStream sets the DCTEncoder for images, to encode a bitmap as JPEG (DCT). |
+ * Result of encodings are cached, if the encoder changes the |
+ * behaivor dynamically and an image is added to a second catalog, |
+ * we will likely use the result of the first encoding call. |
+ * By returning false from the encoder function, the encoder result is not used. |
+ * Callers might not want to encode small images, as the time spent |
+ * encoding and decoding might not be worth the space savings, if any at all. |
+ */ |
+ |
+typedef bool (*EncodeToDCTStream)(SkWStream* stream, const SkBitmap& bitmap, const SkIRect& rect); |
scroggo
2013/09/26 22:05:55
Should these be inside a namespace?
|
+// TODO(edisonn): add here the ones about font, shadow render preferences, |
+// how to export unsupported features, ... |
+ |
+#endif // SkPDFCallbacks_DEFINED |