| Index: include/core/SkRefCnt.h
|
| diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
|
| index 459ad251a8be0b89330c16dd6e43a1fdcf3d6790..4da2fbbc936266662a4510b64a8ce3a9de921972 100644
|
| --- a/include/core/SkRefCnt.h
|
| +++ b/include/core/SkRefCnt.h
|
| @@ -51,11 +51,11 @@ public:
|
| bool unique() const {
|
| // We believe we're reading fRefCnt in a safe way here, so we stifle the TSAN warning about
|
| // an unproctected read. Generally, don't read fRefCnt, and don't stifle this warning.
|
| - bool const unique = (1 == SK_ANNOTATE_UNPROTECTED_READ(fRefCnt));
|
| + bool const unique = (1 == sk_acquire_load(&fRefCnt));
|
| if (unique) {
|
| // Acquire barrier (L/SL), if not provided by load of fRefCnt.
|
| // Prevents user's 'unique' code from happening before decrements.
|
| - //TODO: issue the barrier.
|
| + //TODO: issue the barrier only when unique is true
|
| }
|
| return unique;
|
| }
|
|
|