aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkImageGenerator.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-04-25 10:02:12 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-25 17:59:54 +0000
commit4785897c962c02dd6f92b37850dec527f34387f8 (patch)
treeebbb1153baa94114cc93343c7b788e85197a34f0 /include/core/SkImageGenerator.h
parentbc096bffcbc9b640c09010247994cd64e064384a (diff)
Remove compressed texture support from cacherator
All variants of (on)?[rR]efEncoded(Data)? no longer need a GrContext parameter. Bug: skia:5485 skia:4971 Change-Id: If4f5e785718d5522eb3df8588318ccb8a02a5749 Reviewed-on: https://skia-review.googlesource.com/14269 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include/core/SkImageGenerator.h')
-rw-r--r--include/core/SkImageGenerator.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index 846c380851..3e2396334b 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -35,16 +35,19 @@ public:
uint32_t uniqueID() const { return fUniqueID; }
/**
- * 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,
- * assuming they know it is not suitable for the gpu.
+ * Return a ref to the encoded (i.e. compressed) representation
+ * of this data.
*
* If non-NULL is returned, the caller is responsible for calling
* unref() on the data when it is finished.
*/
- SkData* refEncodedData(GrContext* ctx = nullptr) {
+ SkData* refEncodedData() {
+#ifdef SK_SUPPORT_GPU_REF_ENCODED_DATA
+ GrContext* ctx = nullptr;
return this->onRefEncodedData(ctx);
+#else
+ return this->onRefEncodedData();
+#endif
}
/**
@@ -163,7 +166,11 @@ protected:
SkImageGenerator(const SkImageInfo& info, uint32_t uniqueId = kNeedNewImageUniqueID);
- virtual SkData* onRefEncodedData(GrContext* ctx);
+ virtual SkData* onRefEncodedData(
+#ifdef SK_SUPPORT_GPU_REF_ENCODED_DATA
+ GrContext* ctx
+#endif
+ );
virtual bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
SkPMColor ctable[], int* ctableCount);