Index: tools/LazyDecodeBitmap.h |
diff --git a/tools/LazyDecodeBitmap.h b/tools/LazyDecodeBitmap.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ecceb94f7edbcc9a742dde6b6096a51be3d54d6e |
--- /dev/null |
+++ b/tools/LazyDecodeBitmap.h |
@@ -0,0 +1,24 @@ |
+/* |
+ * 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 LazyDecodeBitmap_DEFINED |
+#define LazyDecodeBitmap_DEFINED |
+ |
+#include "SkTypes.h" |
+ |
+class SkBitmap; |
+ |
+namespace sk_tools { |
+ |
+/** |
+ * Decode the image with DecodeMemoryToTarget but defer the process until it is needed. |
+ */ |
+bool LazyDecodeBitmap(const void* buffer, size_t size, SkBitmap* bitmap); |
+ |
+} |
+ |
+#endif // LazyDecodeBitmap_DEFINED |