Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: src/codec/SkAndroidRawCodec.h

Issue 1520403003: Prototype of RAW decoding in Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Initial upload of the Prototype. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698