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

Unified Diff: include/core/SkImageGenerator.h

Issue 2434323002: Add isEncoded to SkImageGenerator (Closed)
Patch Set: Created 4 years, 2 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 | src/core/SkImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | src/core/SkImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698