зеркало из https://github.com/mozilla/pjs.git
Bug 708109. Remove THEBES_INLINE_DECL_THREADSAFE_REFCOUNTING in favour of NS_ version. r=joe
This commit is contained in:
Родитель
54c594910c
Коммит
3f8b3494fb
|
@ -527,7 +527,7 @@ struct THEBES_API ContextFormat
|
|||
class GLContext
|
||||
: public LibrarySymbolLoader
|
||||
{
|
||||
THEBES_INLINE_DECL_THREADSAFE_REFCOUNTING(GLContext)
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GLContext)
|
||||
public:
|
||||
GLContext(const ContextFormat& aFormat,
|
||||
bool aIsOffscreen = false,
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include "Layers.h"
|
||||
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "gfxPattern.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
|
@ -74,7 +75,7 @@ enum StereoMode {
|
|||
* sampled. For example, cairo images should be sampled in EXTEND_PAD mode.
|
||||
*/
|
||||
class THEBES_API Image {
|
||||
THEBES_INLINE_DECL_THREADSAFE_REFCOUNTING(Image)
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Image)
|
||||
|
||||
public:
|
||||
virtual ~Image() {}
|
||||
|
@ -132,7 +133,7 @@ protected:
|
|||
* video playback without involving the main thread, for example.
|
||||
*/
|
||||
class THEBES_API ImageContainer {
|
||||
THEBES_INLINE_DECL_THREADSAFE_REFCOUNTING(ImageContainer)
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ImageContainer)
|
||||
|
||||
public:
|
||||
ImageContainer() :
|
||||
|
|
|
@ -97,7 +97,7 @@ private:
|
|||
* reference loop between an ImageContainerOGL and its active image.
|
||||
*/
|
||||
class RecycleBin {
|
||||
THEBES_INLINE_DECL_THREADSAFE_REFCOUNTING(RecycleBin)
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RecycleBin)
|
||||
|
||||
typedef mozilla::gl::GLContext GLContext;
|
||||
|
||||
|
|
|
@ -89,27 +89,4 @@ enum gfxBreakPriority {
|
|||
eNormalBreak
|
||||
};
|
||||
|
||||
#define THEBES_INLINE_DECL_THREADSAFE_REFCOUNTING(_class) \
|
||||
public: \
|
||||
nsrefcnt AddRef(void) { \
|
||||
NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt"); \
|
||||
nsrefcnt count = NS_AtomicIncrementRefcnt(mRefCnt); \
|
||||
NS_LOG_ADDREF(this, count, #_class, sizeof(*this)); \
|
||||
return count; \
|
||||
} \
|
||||
nsrefcnt Release(void) { \
|
||||
NS_PRECONDITION(0 != mRefCnt, "dup release"); \
|
||||
nsrefcnt count = NS_AtomicDecrementRefcnt(mRefCnt); \
|
||||
NS_LOG_RELEASE(this, count, #_class); \
|
||||
if (count == 0) { \
|
||||
mRefCnt = 1; /* stabilize */ \
|
||||
delete this; \
|
||||
return 0; \
|
||||
} \
|
||||
return count; \
|
||||
} \
|
||||
protected: \
|
||||
nsAutoRefCnt mRefCnt; \
|
||||
public:
|
||||
|
||||
#endif /* GFX_TYPES_H */
|
||||
|
|
Загрузка…
Ссылка в новой задаче