Chromium Code Reviews| Index: include/codec/SkCodec.h |
| diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h |
| index 1cdc88d4adcfc0dc4e028913348dd21c287e50e7..9d80592568664d795a9eb397d8bdcd1244778227 100644 |
| --- a/include/codec/SkCodec.h |
| +++ b/include/codec/SkCodec.h |
| @@ -149,6 +149,7 @@ public: |
| Options() |
| : fZeroInitialized(kNo_ZeroInitialized) |
| , fSubset(NULL) |
| + , fSampled(false) |
| {} |
| ZeroInitialized fZeroInitialized; |
| @@ -161,6 +162,13 @@ public: |
| * currently supports subsets), the top and left values must be even. |
| */ |
| SkIRect* fSubset; |
| + /** |
| + * If true, the codec is being sampled |
|
scroggo
2015/07/27 19:29:57
This could be more concise, e.g.
Whether the code
|
| + * If false, the codec is not being sampled |
| + * The default value is false |
| + * Used to determine if dstDimensions can be different than srcDimensions |
|
scroggo
2015/07/27 19:29:57
To be fair, dstDimensions can be different than sr
msarett
2015/07/27 20:42:17
+1 for some sort of int fSampleSize with 1 as the
scroggo
2015/07/27 20:47:24
We're in charge of the Android code, so we should
emmaleer
2015/07/28 14:19:16
I've change bool fSampled to int fSampleX. setSamp
|
| + */ |
| + bool fSampled; |
| }; |
| /** |
| @@ -244,6 +252,14 @@ public: |
| return this->onReallyHasAlpha(); |
| } |
| + /** |
| + * returns true if the image is interlaced |
|
scroggo
2015/07/27 19:29:57
These two lines can be more concise, e.g.
Retur
emmaleer
2015/07/28 14:19:16
Yes, I think it's good to explain how the entire i
|
| + * returns false if the image is not interlaced |
| + */ |
| + bool isInterlaced() { |
| + return this->onIsInterlaced(); |
| + } |
| + |
| protected: |
| SkCodec(const SkImageInfo&, SkStream*); |
| @@ -289,6 +305,13 @@ protected: |
| virtual bool onReallyHasAlpha() const { return false; } |
| + /** |
| + * returns true if the image is interlaced |
| + * returns false if the image is not interlaced |
| + * only certain file types can have interlaced images, those of which override this function |
| + */ |
| + virtual bool onIsInterlaced() { return false; } |
| + |
| enum RewindState { |
| kRewound_RewindState, |
| kNoRewindNecessary_RewindState, |