chromium/skia/config/sk_ref_cnt_ext_debug.h

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SKIA_CONFIG_SK_REF_CNT_EXT_DEBUG_H_
#define SKIA_CONFIG_SK_REF_CNT_EXT_DEBUG_H_

#ifdef SKIA_CONFIG_SK_REF_CNT_EXT_RELEASE_H_
#error Only one SkRefCnt should be used.
#endif

#include <atomic>

class SkRefCnt;

namespace WTF {
  void adopted(const SkRefCnt*);
  void requireAdoption(const SkRefCnt*);
}

// Alternate implementation of SkRefCnt for Chromium debug builds
class SK_API SkRefCnt : public SkRefCntBase {};

inline SkRefCnt::SkRefCnt() :{}

inline SkRefCnt::~SkRefCnt() {}

// Bootstrap for Blink's WTF::RefPtr

namespace WTF {
inline void adopted(const SkRefCnt* object) {}
inline void requireAdoption(const SkRefCnt* object) {}
}  // namespace WTF

adopted;
requireAdoption;

#endif  // SKIA_CONFIG_SK_REF_CNT_EXT_DEBUG_H_