Chromium Code Reviews| Index: include/core/SkImageGenerator.h |
| diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h |
| index 3712a924a55f45e21439f9d631bad4ad02ecd3f9..1bd43675fb91fbb0f4e07018da2d4587762cd050 100644 |
| --- a/include/core/SkImageGenerator.h |
| +++ b/include/core/SkImageGenerator.h |
| @@ -70,6 +70,11 @@ public: |
| uint32_t uniqueID() const { return fUniqueID; } |
| /** |
| + * Returns true if the image is encoded (i.e. compressed). |
| + */ |
| + bool isEncoded() const { return this->onIsEncoded(); } |
|
cblume
2016/10/20 19:08:39
Note that this is adding a function to the public
|
| + |
| + /** |
| * Return a ref to the encoded (i.e. compressed) representation, |
| * of this data. If the GrContext is non-null, then the caller is only interested in |
| * gpu-specific formats, so the impl may return null even if they have encoded data, |
| @@ -257,6 +262,8 @@ protected: |
| SkImageGenerator(const SkImageInfo& info, uint32_t uniqueId = kNeedNewImageUniqueID); |
| + virtual bool onIsEncoded() const; |
| + |
| virtual SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM); |
| virtual bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, |