diff options
author | 2014-07-09 07:52:32 -0700 | |
---|---|---|
committer | 2014-07-09 07:52:32 -0700 | |
commit | bd7746da97e389c1068333117407b213b378f9db (patch) | |
tree | 46c0f9612d9802bd49b68ac37e73a8f1638bcd4c /include/core | |
parent | ecce60bad6e3b7a72e1eba820bc3be15d39a1c21 (diff) |
Remove ability for Release code to call getRefCnt() or getWeakRefCnt().
These getRefCnt() methods are not thread safe, so Skia code should not
be calling them. unique() is fine.
SkDEBUG code (SkASSERTs) can still call getRefCnt() / getWeakRefCnt().
This adds tools/RefCntIs.{h,cpp}, which lets tests make their assertions in
both debug and release modes.
BUG=skia:2726
Committed: https://skia.googlesource.com/skia/+/4ae94ffce5ecf1b71cb5e295b68bf4ec9e697443
R=senorblanco@chromium.org, mtklein@google.com, reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/378643003
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkImageFilter.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index ea882537c1..a571184aa2 100644 --- a/include/core/SkImageFilter.h +++ b/include/core/SkImageFilter.h @@ -51,6 +51,7 @@ public: class SK_API Cache : public SkRefCnt { public: // By default, we cache only image filters with 2 or more children. + // Values less than 2 mean always cache; values greater than 2 are not supported. static Cache* Create(int minChildren = 2); virtual ~Cache() {} virtual bool get(const SkImageFilter* key, SkBitmap* result, SkIPoint* offset) = 0; |