diff options
author | Greg Daniel <egdaniel@google.com> | 2018-03-06 15:17:57 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-07 02:30:35 +0000 |
commit | fcea56c5d85a7bb91600194a5641a3958f96db9a (patch) | |
tree | 96f0164807064cb79308fb35eb5202dbd73c16cd /include | |
parent | 744434017871dae6b4e6451dac8601b923e80091 (diff) |
Make GrReleaseProcHelper an SkWeakRefCnt
Bug: skia:
Change-Id: Iccc22d477c17c4c58615e3f3bf9e551f9596b710
Reviewed-on: https://skia-review.googlesource.com/112562
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/private/GrTypesPriv.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h index c7a7296639..5c6d1024be 100644 --- a/include/private/GrTypesPriv.h +++ b/include/private/GrTypesPriv.h @@ -12,7 +12,7 @@ #include "GrSharedEnums.h" #include "GrTypes.h" #include "SkImageInfo.h" -#include "SkRefCnt.h" +#include "SkWeakRefCnt.h" class GrCaps; @@ -1247,14 +1247,16 @@ static inline GrPixelConfig GrColorTypeToPixelConfig(GrColorType config, return kUnknown_GrPixelConfig; } -class GrReleaseProcHelper : public SkRefCnt { +class GrReleaseProcHelper : public SkWeakRefCnt { public: // These match the definitions in SkImage, from whence they came typedef void* ReleaseCtx; typedef void (*ReleaseProc)(ReleaseCtx); GrReleaseProcHelper(ReleaseProc proc, ReleaseCtx ctx) : fReleaseProc(proc), fReleaseCtx(ctx) {} - ~GrReleaseProcHelper() override { + ~GrReleaseProcHelper() override {} + + void weak_dispose() const override { fReleaseProc(fReleaseCtx); } |