add client-context to SkWriteBuffer
Bug: skia: Change-Id: I56c36060442c4008b09f322fb1d19e81cd75f910 Reviewed-on: https://skia-review.googlesource.com/66860 Reviewed-by: Khusal Sagar <khushalsagar@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
8be4a33005
commit
88ea5b9c66
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user