Index: src/codec/SkAndroidRawCodec.h |
diff --git a/src/codec/SkAndroidRawCodec.h b/src/codec/SkAndroidRawCodec.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..29ec3bb5a9d59675bbfb66f11b9ecf6309b82a67 |
--- /dev/null |
+++ b/src/codec/SkAndroidRawCodec.h |
@@ -0,0 +1,44 @@ |
+/* |
+ * Copyright 2015 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef SkAndroidRawCodec_DEFINED |
+#define SkAndroidRawCodec_DEFINED |
+ |
+#include "SkAndroidCodec.h" |
+#include "SkCodec.h" |
+#include "SkEncodedFormat.h" |
+#include "SkRawCodec.h" |
+#include "SkStream.h" |
+#include "SkTypes.h" |
+ |
+/** |
+ * Abstract interface defining image codec functionality that is necessary for |
+ * Android. |
+ */ |
+class SkAndroidRawCodec : public SkAndroidCodec { |
djsollen
2015/12/16 20:35:34
Not sure that you need this file at all, but I'll
scroggo
2015/12/18 15:56:26
SkAndroidCodec.cpp needs to be able to call the co
yujieqin
2016/01/06 18:47:18
Renamed the files and class.
|
+public: |
+ |
+ explicit SkAndroidRawCodec(SkRawCodec*); |
+ |
+ virtual ~SkAndroidRawCodec() {} |
+ |
+protected: |
+ |
+ //SkEncodedFormat onGetEncodedFormat() const override { return kRAW_SkEncodedFormat; }; |
scroggo
2015/12/18 15:56:26
I'm assuming this file does not build with this co
yujieqin
2016/01/06 18:47:18
The default implementation of getEncodedFormat() a
|
+ |
+ SkISize onGetSampledDimensions(int sampleSize) const override; |
+ |
+ bool onGetSupportedSubset(SkIRect* desiredSubset) const override { return false; } |
+ |
+ SkCodec::Result onGetAndroidPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, |
+ const AndroidOptions& options) override; |
+ |
+private: |
+ |
+ typedef SkAndroidCodec INHERITED; |
+}; |
+#endif // SkAndroidRawCodec_DEFINED |