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

Unified Diff: include/codec/SkCodec.h

Issue 1018953003: Add SkEncodedFormat, used by SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use a common enum for SkImageEncoder and SkImageDecoder and SkCodec Created 5 years, 9 months 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: include/codec/SkCodec.h
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index 6d0557cb28d22445c9dd9de1550e8a99eea97e6a..6345c8d475881da4ae7b0c79039b4ab976e3e9dc 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -8,6 +8,7 @@
#ifndef SkCodec_DEFINED
#define SkCodec_DEFINED
+#include "SkEncodedFormat.h"
#include "SkImageGenerator.h"
#include "SkImageInfo.h"
#include "SkSize.h"
@@ -50,6 +51,11 @@ public:
return this->onGetScaledDimensions(desiredScale);
}
+ /**
+ * Format of the encoded data.
+ */
+ SkEncodedFormat getEncodedFormat() const { return this->onGetEncodedFormat(); }
+
protected:
SkCodec(const SkImageInfo&, SkStream*);
@@ -71,6 +77,8 @@ protected:
return fInfo.dimensions();
}
+ virtual SkEncodedFormat onGetEncodedFormat() const = 0;
+
/**
* If the stream was previously read, attempt to rewind.
* @returns:
« no previous file with comments | « gyp/images.gyp ('k') | include/core/SkEncodedFormat.h » ('j') | include/core/SkEncodedFormat.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698