aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/core/SkWriteBuffer.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h
index 6cbd4eaf54..48c09eaf27 100644
--- a/include/core/SkWriteBuffer.h
+++ b/include/core/SkWriteBuffer.h
@@ -66,8 +66,21 @@ public:
void setDeduper(SkDeduper* deduper) { fDeduper = deduper; }
+ /**
+ * Return a client specified context pointer. This is not interpreted by the writebuffer.
+ * It defaults to nullptr, but may be set with setClientContext(...).
+ */
+ void* getClientContext() const { return fClientCtx; }
+
+ /**
+ * Set the client specified context pointer. This is not interpreted by the writebuffer.
+ * It defaults to nullptr. It can be inspected by calling getClientContext().
+ */
+ void setClientContext(void* ctx) { fClientCtx = ctx; }
+
protected:
SkDeduper* fDeduper = nullptr;
+ void* fClientCtx = nullptr;
};
/**