diff options
author | Robert Phillips <robertphillips@google.com> | 2017-11-10 15:28:13 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-13 13:22:20 +0000 |
commit | 8d5ce2d9ede0c241b906f1a0df9dac3cf3c3aa55 (patch) | |
tree | 522edab76f8309c0bfb8ca73b084924902c89792 /include | |
parent | 34922a64225ba62eaed82880538cde514a6fd61c (diff) |
Patch up ref counting of proxies
Bug: skia:
Change-Id: If746283d788368bf7aad6d285f181d8531768e61
Reviewed-on: https://skia-review.googlesource.com/70024
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/private/GrSurfaceProxy.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 23f62195c2..f99e199dee 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -131,7 +131,7 @@ protected: SkASSERT(fTarget); SkASSERT(fTarget->fRefCnt > 0); - fTarget->fRefCnt += (fRefCnt-1); // don't xfer the proxy's creation ref + fTarget->fRefCnt += SkTMax(0, fRefCnt-1); // don't xfer the proxy's creation ref fTarget->fPendingReads += fPendingReads; fTarget->fPendingWrites += fPendingWrites; } |