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

Unified Diff: include/codec/SkCodec.h

Issue 1820073002: Add SkEncodedInfo to report properties of encoded image data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Order of param eval bug Created 4 years, 8 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/SkEncodedInfo.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 629274d21ccacc734259c981b670d60cf1d37c5e..50875e46c4a42cfbef1d204a0af3bfa01a74b38c 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -11,6 +11,7 @@
#include "../private/SkTemplates.h"
#include "SkColor.h"
#include "SkEncodedFormat.h"
+#include "SkEncodedInfo.h"
#include "SkImageInfo.h"
#include "SkSize.h"
#include "SkStream.h"
@@ -100,6 +101,8 @@ public:
*/
const SkImageInfo& getInfo() const { return fSrcInfo; }
+ const SkEncodedInfo& getEncodedInfo() const { return fEncodedInfo; }
+
/**
* Returns the color space associated with the codec.
* Does not affect ownership.
@@ -511,7 +514,9 @@ protected:
/**
* Takes ownership of SkStream*
*/
- SkCodec(const SkImageInfo&,
+ SkCodec(int width,
+ int height,
+ const SkEncodedInfo&,
SkStream*,
sk_sp<SkColorSpace> = nullptr,
Origin = kTopLeft_Origin);
@@ -642,6 +647,7 @@ protected:
virtual int onOutputScanline(int inputScanline) const;
private:
+ const SkEncodedInfo fEncodedInfo;
const SkImageInfo fSrcInfo;
SkAutoTDelete<SkStream> fStream;
bool fNeedsRewind;
« no previous file with comments | « no previous file | include/codec/SkEncodedInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698