aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkImage_Gpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h
index ff2aaaf07c..c79e5295be 100644
--- a/src/image/SkImage_Gpu.h
+++ b/src/image/SkImage_Gpu.h
@@ -135,6 +135,11 @@ public:
bool onIsValid(GrContext*) const override;
+ void resetContext(sk_sp<GrContext> newContext) {
+ SkASSERT(fContext->uniqueID() == newContext->uniqueID());
+ fContext = newContext;
+ }
+
private:
sk_sp<GrContext> fContext;
sk_sp<GrTextureProxy> fProxy;