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

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: Just change SkCodec, with TODO for the others. 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
« no previous file with comments | « no previous file | include/codec/SkEncodedFormat.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/codec/SkCodec.h
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index 3550bb183108ebc21b7a52c7b5eca2b5be67cce1..ec4b3e1cc80832090c1389823b7e206ab6e97783 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*);
@@ -73,6 +79,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 | « no previous file | include/codec/SkEncodedFormat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698