Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()."
authorMike Klein <mtklein@google.com>
Wed, 9 Jul 2014 13:04:07 +0000 (09:04 -0400)
committerMike Klein <mtklein@google.com>
Wed, 9 Jul 2014 13:04:07 +0000 (09:04 -0400)
This reverts commit 4ae94ffce5ecf1b71cb5e295b68bf4ec9e697443.

BUG=skia:

Review URL: https://codereview.chromium.org/382523002

16 files changed:
gyp/tests.gypi
gyp/tools.gyp
include/core/SkImageFilter.h
include/core/SkRefCnt.h
include/core/SkWeakRefCnt.h
src/core/SkImageFilter.cpp
tests/ClipCacheTest.cpp
tests/ImageFilterTest.cpp
tests/MetaDataTest.cpp
tests/RefCntTest.cpp
tests/RefDictTest.cpp
tests/SurfaceTest.cpp
tests/UtilsTest.cpp
tools/RefCntIs.cpp [deleted file]
tools/RefCntIs.h [deleted file]
tools/tsan.supp

index ba0bc87..66741d5 100644 (file)
@@ -24,7 +24,6 @@
     'tools.gyp:picture_utils',
     'tools.gyp:resources',
     'tools.gyp:sk_tool_utils',
-    'tools.gyp:ref_cnt_is',
   ],
   'sources': [
     '../tests/Test.cpp',
index 30d014c..e16fa4b 100644 (file)
         ],
       ],
     },
-    {
-      'target_name': 'ref_cnt_is',
-      'type': 'static_library',
-      'sources': [ '../tools/RefCntIs.cpp' ],
-      'direct_dependent_settings': {
-        'include_dirs': [ '../tools' ],
-      },
-      'dependencies': [
-        'skia_lib.gyp:skia_lib',
-      ],
-    },
     {  # This would go in gm.gyp, but it's also used by skimage below.
       'target_name': 'gm_expectations',
       'type': 'static_library',
index a571184..ea88253 100644 (file)
@@ -51,7 +51,6 @@ 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;
index d3a26df..1724c77 100644 (file)
@@ -42,10 +42,8 @@ public:
 #endif
     }
 
-#ifdef SK_DEBUG
     /** Return the reference count. Use only for debugging. */
     int32_t getRefCnt() const { return fRefCnt; }
-#endif
 
     /** May return true if the caller is the only owner.
      *  Ensures that all previous owner's actions are complete.
@@ -120,9 +118,6 @@ private:
 
     mutable int32_t fRefCnt;
 
-    // Used by tests.
-    friend bool RefCntIs(const SkRefCntBase&, int32_t);
-
     typedef SkNoncopyable INHERITED;
 };
 
index d9f0dc8..210dcc9 100644 (file)
@@ -60,18 +60,20 @@ public:
     */
     SkWeakRefCnt() : SkRefCnt(), fWeakCnt(1) {}
 
-#ifdef SK_DEBUG
     /** Destruct, asserting that the weak reference count is 1.
     */
     virtual ~SkWeakRefCnt() {
+#ifdef SK_DEBUG
         SkASSERT(fWeakCnt == 1);
         fWeakCnt = 0;
+#endif
     }
 
     /** Return the weak reference count.
     */
     int32_t getWeakCnt() const { return fWeakCnt; }
 
+#ifdef SK_DEBUG
     void validate() const {
         this->INHERITED::validate();
         SkASSERT(fWeakCnt > 0);
@@ -153,9 +155,6 @@ private:
     /* Invariant: fWeakCnt = #weak + (fRefCnt > 0 ? 1 : 0) */
     mutable int32_t fWeakCnt;
 
-    // Used by tests.
-    friend bool WeakRefCntIs(const SkWeakRefCnt&, int32_t);
-
     typedef SkRefCnt INHERITED;
 };
 
index 64603b4..8402a55 100644 (file)
@@ -361,10 +361,7 @@ static uint32_t compute_hash(const uint32_t* data, int count) {
 
 class CacheImpl : public SkImageFilter::Cache {
 public:
-    explicit CacheImpl(int minChildren) : fMinChildren(minChildren) {
-        SkASSERT(fMinChildren <= 2);
-    }
-
+    explicit CacheImpl(int minChildren) : fMinChildren(minChildren) {}
     virtual ~CacheImpl();
     bool get(const SkImageFilter* key, SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
     void set(const SkImageFilter* key, const SkBitmap& result, const SkIPoint& offset) SK_OVERRIDE;
@@ -407,10 +404,7 @@ void CacheImpl::remove(const SkImageFilter* key) {
 }
 
 void CacheImpl::set(const SkImageFilter* key, const SkBitmap& result, const SkIPoint& offset) {
-    if (fMinChildren < 2 || !key->unique()) {
-        // We take !key->unique() as a signal that there are probably at least 2 refs on the key,
-        // meaning this filter probably has at least two children and is worth caching when
-        // fMinChildren is 2.  If fMinChildren is less than two, we'll just always cache.
+    if (key->getRefCnt() >= fMinChildren) {
         fData.add(new Value(key, result, offset));
     }
 }
index c6f33c7..77f0137 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include "Test.h"
-#include "RefCntIs.h"
 // This is a GR test
 #if SK_SUPPORT_GPU
 #include "../../src/gpu/GrClipMaskManager.h"
@@ -165,14 +164,14 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
 
     // check that the set took
     check_state(reporter, cache, clip1, texture1, bound1);
-    REPORTER_ASSERT(reporter, !RefCntIs(*texture1, 0));
+    REPORTER_ASSERT(reporter, texture1->getRefCnt());
 
     // push the state
     cache.push();
 
     // verify that the pushed state is initially empty
     check_empty_state(reporter, cache);
-    REPORTER_ASSERT(reporter, !RefCntIs(*texture1, 0));
+    REPORTER_ASSERT(reporter, texture1->getRefCnt());
 
     // modify the new state
     SkIRect bound2;
@@ -190,8 +189,8 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
 
     // check that the changes took
     check_state(reporter, cache, clip2, texture2, bound2);
-    REPORTER_ASSERT(reporter, !RefCntIs(*texture1, 0));
-    REPORTER_ASSERT(reporter, !RefCntIs(*texture2, 0));
+    REPORTER_ASSERT(reporter, texture1->getRefCnt());
+    REPORTER_ASSERT(reporter, texture2->getRefCnt());
 
     // check to make sure canReuse works
     REPORTER_ASSERT(reporter, cache.canReuse(clip2.getTopmostGenID(), bound2));
@@ -202,7 +201,7 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
 
     // verify that the old state is restored
     check_state(reporter, cache, clip1, texture1, bound1);
-    REPORTER_ASSERT(reporter, !RefCntIs(*texture1, 0));
+    REPORTER_ASSERT(reporter, texture1->getRefCnt());
 
     // manually clear the state
     cache.reset();
index 20899f4..3282208 100644 (file)
@@ -262,7 +262,7 @@ static void test_crop_rects(SkBaseDevice* device, skiatest::Reporter* reporter)
         SkIPoint offset;
         SkString str;
         str.printf("filter %d", static_cast<int>(i));
-        SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create());
+        SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(2));
         SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), cache.get());
         REPORTER_ASSERT_MESSAGE(reporter, filter->filterImage(&proxy, bitmap, ctx,
                                 &result, &offset), str.c_str());
index 293e12a..eb7eae9 100644 (file)
@@ -6,12 +6,11 @@
  */
 
 #include "SkMetaData.h"
-#include "RefCntIs.h"
 #include "Test.h"
 
 static void test_ptrs(skiatest::Reporter* reporter) {
     SkRefCnt ref;
-    REPORTER_ASSERT(reporter, RefCntIs(ref, 1));
+    REPORTER_ASSERT(reporter, 1 == ref.getRefCnt());
 
     {
         SkMetaData md0, md1;
@@ -20,19 +19,19 @@ static void test_ptrs(skiatest::Reporter* reporter) {
         md0.setRefCnt(name, &ref);
         REPORTER_ASSERT(reporter, md0.findRefCnt(name));
         REPORTER_ASSERT(reporter, md0.hasRefCnt(name, &ref));
-        REPORTER_ASSERT(reporter, RefCntIs(ref, 2));
+        REPORTER_ASSERT(reporter, 2 == ref.getRefCnt());
 
         md1 = md0;
         REPORTER_ASSERT(reporter, md1.findRefCnt(name));
         REPORTER_ASSERT(reporter, md1.hasRefCnt(name, &ref));
-        REPORTER_ASSERT(reporter, RefCntIs(ref, 3));
+        REPORTER_ASSERT(reporter, 3 == ref.getRefCnt());
 
         REPORTER_ASSERT(reporter, md0.removeRefCnt(name));
         REPORTER_ASSERT(reporter, !md0.findRefCnt(name));
         REPORTER_ASSERT(reporter, !md0.hasRefCnt(name, &ref));
-        REPORTER_ASSERT(reporter, RefCntIs(ref, 2));
+        REPORTER_ASSERT(reporter, 2 == ref.getRefCnt());
     }
-    REPORTER_ASSERT(reporter, RefCntIs(ref, 1));
+    REPORTER_ASSERT(reporter, 1 == ref.getRefCnt());
 }
 
 DEF_TEST(MetaData, reporter) {
index 5f2cbe4..bd4f348 100644 (file)
@@ -10,7 +10,6 @@
 #include "SkThreadUtils.h"
 #include "SkTypes.h"
 #include "SkWeakRefCnt.h"
-#include "RefCntIs.h"
 #include "Test.h"
 
 class InstCounterClass {
@@ -34,7 +33,7 @@ static void test_refarray(skiatest::Reporter* reporter) {
     const int N = 10;
     SkTRefArray<InstCounterClass>* array = SkTRefArray<InstCounterClass>::Create(N);
 
-    REPORTER_ASSERT(reporter, RefCntIs(*array, 1));
+    REPORTER_ASSERT(reporter, 1 == array->getRefCnt());
     REPORTER_ASSERT(reporter, N == array->count());
 
     REPORTER_ASSERT(reporter, N == InstCounterClass::gInstCounter);
@@ -51,7 +50,7 @@ static void test_refarray(skiatest::Reporter* reporter) {
     }
 
     array = SkTRefArray<InstCounterClass>::Create(src, N);
-    REPORTER_ASSERT(reporter, RefCntIs(*array, 1));
+    REPORTER_ASSERT(reporter, 1 == array->getRefCnt());
     REPORTER_ASSERT(reporter, N == array->count());
 
     REPORTER_ASSERT(reporter, 2*N == InstCounterClass::gInstCounter);
@@ -92,7 +91,7 @@ static void test_refCnt(skiatest::Reporter* reporter) {
     thing1.join();
     thing2.join();
 
-    REPORTER_ASSERT(reporter, RefCntIs(*ref, 1));
+    REPORTER_ASSERT(reporter, ref->getRefCnt() == 1);
     ref->unref();
 }
 
@@ -136,8 +135,8 @@ static void test_weakRefCnt(skiatest::Reporter* reporter) {
     thing3.join();
     thing4.join();
 
-    REPORTER_ASSERT(reporter, RefCntIs(*ref, 1));
-    REPORTER_ASSERT(reporter, WeakRefCntIs(*ref, 1));
+    REPORTER_ASSERT(reporter, ref->getRefCnt() == 1);
+    REPORTER_ASSERT(reporter, ref->getWeakCnt() == 1);
     ref->unref();
 }
 
index 5b9987e..1e18a68 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include "SkRefDict.h"
-#include "RefCntIs.h"
 #include "Test.h"
 
 class TestRC : public SkRefCnt {
@@ -26,50 +25,50 @@ DEF_TEST(RefDict, reporter) {
 
     dict.set("foo", &data0);
     REPORTER_ASSERT(reporter, &data0 == dict.find("foo"));
-    REPORTER_ASSERT(reporter, RefCntIs(data0, 2));
+    REPORTER_ASSERT(reporter, 2 == data0.getRefCnt());
 
     dict.set("foo", &data0);
     REPORTER_ASSERT(reporter, &data0 == dict.find("foo"));
-    REPORTER_ASSERT(reporter, RefCntIs(data0, 2));
+    REPORTER_ASSERT(reporter, 2 == data0.getRefCnt());
 
     dict.set("foo", &data1);
     REPORTER_ASSERT(reporter, &data1 == dict.find("foo"));
-    REPORTER_ASSERT(reporter, RefCntIs(data0, 1));
-    REPORTER_ASSERT(reporter, RefCntIs(data1, 2));
+    REPORTER_ASSERT(reporter, 1 == data0.getRefCnt());
+    REPORTER_ASSERT(reporter, 2 == data1.getRefCnt());
 
     dict.set("foo", NULL);
     REPORTER_ASSERT(reporter, NULL == dict.find("foo"));
-    REPORTER_ASSERT(reporter, RefCntIs(data0, 1));
-    REPORTER_ASSERT(reporter, RefCntIs(data1, 1));
+    REPORTER_ASSERT(reporter, 1 == data0.getRefCnt());
+    REPORTER_ASSERT(reporter, 1 == data1.getRefCnt());
 
     dict.set("foo", &data0);
     dict.set("bar", &data1);
     REPORTER_ASSERT(reporter, &data0 == dict.find("foo"));
     REPORTER_ASSERT(reporter, &data1 == dict.find("bar"));
-    REPORTER_ASSERT(reporter, RefCntIs(data0, 2));
-    REPORTER_ASSERT(reporter, RefCntIs(data1, 2));
+    REPORTER_ASSERT(reporter, 2 == data0.getRefCnt());
+    REPORTER_ASSERT(reporter, 2 == data1.getRefCnt());
 
     dict.set("foo", &data1);
     REPORTER_ASSERT(reporter, &data1 == dict.find("foo"));
     REPORTER_ASSERT(reporter, &data1 == dict.find("bar"));
-    REPORTER_ASSERT(reporter, RefCntIs(data0, 1));
-    REPORTER_ASSERT(reporter, RefCntIs(data1, 3));
+    REPORTER_ASSERT(reporter, 1 == data0.getRefCnt());
+    REPORTER_ASSERT(reporter, 3 == data1.getRefCnt());
 
     dict.removeAll();
     REPORTER_ASSERT(reporter, NULL == dict.find("foo"));
     REPORTER_ASSERT(reporter, NULL == dict.find("bar"));
-    REPORTER_ASSERT(reporter, RefCntIs(data0, 1));
-    REPORTER_ASSERT(reporter, RefCntIs(data1, 1));
+    REPORTER_ASSERT(reporter, 1 == data0.getRefCnt());
+    REPORTER_ASSERT(reporter, 1 == data1.getRefCnt());
 
     {
         SkRefDict d;
         REPORTER_ASSERT(reporter, NULL == d.find("foo"));
-        REPORTER_ASSERT(reporter, RefCntIs(data0, 1));
+        REPORTER_ASSERT(reporter, 1 == data0.getRefCnt());
         d.set("foo", &data0);
         REPORTER_ASSERT(reporter, &data0 == d.find("foo"));
-        REPORTER_ASSERT(reporter, RefCntIs(data0, 2));
+        REPORTER_ASSERT(reporter, 2 == data0.getRefCnt());
         // let d go out of scope still with a ref on data0
     }
     // be sure d's destructor lowered data0's owner count back to 1
-    REPORTER_ASSERT(reporter, RefCntIs(data0, 1));
+    REPORTER_ASSERT(reporter, 1 == data0.getRefCnt());
 }
index 93ba3c2..610e337 100644 (file)
@@ -11,7 +11,6 @@
 #include "SkRRect.h"
 #include "SkSurface.h"
 #include "SkUtils.h"
-#include "RefCntIs.h"
 #include "Test.h"
 
 #if SK_SUPPORT_GPU
@@ -78,11 +77,11 @@ static void test_image(skiatest::Reporter* reporter) {
     void* addr = sk_malloc_throw(size);
     SkData* data = SkData::NewFromMalloc(addr, size);
 
-    REPORTER_ASSERT(reporter, RefCntIs(*data, 1));
+    REPORTER_ASSERT(reporter, 1 == data->getRefCnt());
     SkImage* image = SkImage::NewRasterData(info, data, rowBytes);
-    REPORTER_ASSERT(reporter, RefCntIs(*data, 2));
+    REPORTER_ASSERT(reporter, 2 == data->getRefCnt());
     image->unref();
-    REPORTER_ASSERT(reporter, RefCntIs(*data, 1));
+    REPORTER_ASSERT(reporter, 1 == data->getRefCnt());
     data->unref();
 }
 
index 9454b54..438a5cc 100644 (file)
@@ -10,7 +10,6 @@
 #include "SkTSearch.h"
 #include "SkTSort.h"
 #include "SkUtils.h"
-#include "RefCntIs.h"
 #include "Test.h"
 
 class RefClass : public SkRefCnt {
@@ -28,30 +27,30 @@ private:
 
 static void test_autounref(skiatest::Reporter* reporter) {
     RefClass obj(0);
-    REPORTER_ASSERT(reporter, RefCntIs(obj, 1));
+    REPORTER_ASSERT(reporter, 1 == obj.getRefCnt());
 
     SkAutoTUnref<RefClass> tmp(&obj);
     REPORTER_ASSERT(reporter, &obj == tmp.get());
-    REPORTER_ASSERT(reporter, RefCntIs(obj, 1));
+    REPORTER_ASSERT(reporter, 1 == obj.getRefCnt());
 
     REPORTER_ASSERT(reporter, &obj == tmp.detach());
-    REPORTER_ASSERT(reporter, RefCntIs(obj, 1));
+    REPORTER_ASSERT(reporter, 1 == obj.getRefCnt());
     REPORTER_ASSERT(reporter, NULL == tmp.detach());
     REPORTER_ASSERT(reporter, NULL == tmp.get());
 
     obj.ref();
-    REPORTER_ASSERT(reporter, RefCntIs(obj, 2));
+    REPORTER_ASSERT(reporter, 2 == obj.getRefCnt());
     {
         SkAutoTUnref<RefClass> tmp2(&obj);
     }
-    REPORTER_ASSERT(reporter, RefCntIs(obj, 1));
+    REPORTER_ASSERT(reporter, 1 == obj.getRefCnt());
 }
 
 static void test_autostarray(skiatest::Reporter* reporter) {
     RefClass obj0(0);
     RefClass obj1(1);
-    REPORTER_ASSERT(reporter, RefCntIs(obj0, 1));
-    REPORTER_ASSERT(reporter, RefCntIs(obj1, 1));
+    REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt());
+    REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt());
 
     {
         SkAutoSTArray<2, SkRefPtr<RefClass> > tmp;
@@ -62,14 +61,14 @@ static void test_autostarray(skiatest::Reporter* reporter) {
         REPORTER_ASSERT(reporter, 4 == tmp.count());
         tmp[0] = &obj0;
         tmp[1] = &obj1;
-        REPORTER_ASSERT(reporter, RefCntIs(obj0, 2));
-        REPORTER_ASSERT(reporter, RefCntIs(obj1, 2));
+        REPORTER_ASSERT(reporter, 2 == obj0.getRefCnt());
+        REPORTER_ASSERT(reporter, 2 == obj1.getRefCnt());
 
         // test out reset with data in the array (and a new allocation)
         tmp.reset(0);
         REPORTER_ASSERT(reporter, 0 == tmp.count());
-        REPORTER_ASSERT(reporter, RefCntIs(obj0, 1));
-        REPORTER_ASSERT(reporter, RefCntIs(obj1, 1));
+        REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt());
+        REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt());
 
         tmp.reset(2);   // this should use the preexisting allocation
         REPORTER_ASSERT(reporter, 2 == tmp.count());
@@ -78,8 +77,8 @@ static void test_autostarray(skiatest::Reporter* reporter) {
     }
 
     // test out destructor with data in the array (and using existing allocation)
-    REPORTER_ASSERT(reporter, RefCntIs(obj0, 1));
-    REPORTER_ASSERT(reporter, RefCntIs(obj1, 1));
+    REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt());
+    REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt());
 
     {
         // test out allocating ctor (this should allocate new memory)
@@ -88,32 +87,32 @@ static void test_autostarray(skiatest::Reporter* reporter) {
 
         tmp[0] = &obj0;
         tmp[1] = &obj1;
-        REPORTER_ASSERT(reporter, RefCntIs(obj0, 2));
-        REPORTER_ASSERT(reporter, RefCntIs(obj1, 2));
+        REPORTER_ASSERT(reporter, 2 == obj0.getRefCnt());
+        REPORTER_ASSERT(reporter, 2 == obj1.getRefCnt());
 
         // Test out resut with data in the array and malloced storage
         tmp.reset(0);
-        REPORTER_ASSERT(reporter, RefCntIs(obj0, 1));
-        REPORTER_ASSERT(reporter, RefCntIs(obj1, 1));
+        REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt());
+        REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt());
 
         tmp.reset(2);   // this should use the preexisting storage
         tmp[0] = &obj0;
         tmp[1] = &obj1;
-        REPORTER_ASSERT(reporter, RefCntIs(obj0, 2));
-        REPORTER_ASSERT(reporter, RefCntIs(obj1, 2));
+        REPORTER_ASSERT(reporter, 2 == obj0.getRefCnt());
+        REPORTER_ASSERT(reporter, 2 == obj1.getRefCnt());
 
         tmp.reset(4);   // this should force a new malloc
-        REPORTER_ASSERT(reporter, RefCntIs(obj0, 1));
-        REPORTER_ASSERT(reporter, RefCntIs(obj1, 1));
+        REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt());
+        REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt());
 
         tmp[0] = &obj0;
         tmp[1] = &obj1;
-        REPORTER_ASSERT(reporter, RefCntIs(obj0, 2));
-        REPORTER_ASSERT(reporter, RefCntIs(obj1, 2));
+        REPORTER_ASSERT(reporter, 2 == obj0.getRefCnt());
+        REPORTER_ASSERT(reporter, 2 == obj1.getRefCnt());
     }
 
-    REPORTER_ASSERT(reporter, RefCntIs(obj0, 1));
-    REPORTER_ASSERT(reporter, RefCntIs(obj1, 1));
+    REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt());
+    REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt());
 }
 
 /////////////////////////////////////////////////////////////////////////////
diff --git a/tools/RefCntIs.cpp b/tools/RefCntIs.cpp
deleted file mode 100644 (file)
index 48154b0..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "RefCntIs.h"
-
-bool RefCntIs(const SkRefCntBase& obj, int32_t n) {
-    return obj.fRefCnt == n;
-}
-
-bool WeakRefCntIs(const SkWeakRefCnt& obj, int32_t n) {
-    return obj.fWeakCnt == n;
-}
diff --git a/tools/RefCntIs.h b/tools/RefCntIs.h
deleted file mode 100644 (file)
index 86d3cc3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef RefCntIs_DEFINED
-#define RefCntIs_DEFINED
-
-// Allows tests to assert a particular value for a ref count,
-// without letting Skia library code look at that value.
-
-#include "SkRefCnt.h"
-#include "SkWeakRefCnt.h"
-
-bool RefCntIs(const SkRefCntBase&, int32_t);
-bool WeakRefCntIs(const SkWeakRefCnt&, int32_t);
-
-#endif//RefCntIs_DEFINED
index f687014..8c95e7a 100644 (file)
@@ -25,3 +25,6 @@ race:is_lcd_supported
 race:RefFCI
 race:SkString
 race:SkPDF
+
+# This calls SkRefCnt::getRefCnt(), which is not thread safe.  skia:2726
+race:SkImageFilter::filterImage