mirror of https://github.com/PCSX2/pcsx2.git
gsdx-queue: pass shared_ptr by reference
It avoids atomic +1/-1 of the reference counter The counter is still incremented when the ptr is copyed into the queue
This commit is contained in:
parent
84b33d2ddb
commit
d91e989abb
|
@ -104,7 +104,7 @@ int GSRasterizer::FindMyNextScanline(int top) const
|
||||||
return top;
|
return top;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSRasterizer::Queue(shared_ptr<GSRasterizerData> data)
|
void GSRasterizer::Queue(const shared_ptr<GSRasterizerData>& data)
|
||||||
{
|
{
|
||||||
Draw(data.get());
|
Draw(data.get());
|
||||||
}
|
}
|
||||||
|
@ -1155,7 +1155,7 @@ GSRasterizerList::~GSRasterizerList()
|
||||||
_aligned_free(m_scanline);
|
_aligned_free(m_scanline);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSRasterizerList::Queue(shared_ptr<GSRasterizerData> data)
|
void GSRasterizerList::Queue(const shared_ptr<GSRasterizerData>& data)
|
||||||
{
|
{
|
||||||
GSVector4i r = data->bbox.rintersect(data->scissor);
|
GSVector4i r = data->bbox.rintersect(data->scissor);
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ class IRasterizer : public GSAlignedClass<32>
|
||||||
public:
|
public:
|
||||||
virtual ~IRasterizer() {}
|
virtual ~IRasterizer() {}
|
||||||
|
|
||||||
virtual void Queue(shared_ptr<GSRasterizerData> data) = 0;
|
virtual void Queue(const shared_ptr<GSRasterizerData>& data) = 0;
|
||||||
virtual void Sync() = 0;
|
virtual void Sync() = 0;
|
||||||
virtual bool IsSynced() const = 0;
|
virtual bool IsSynced() const = 0;
|
||||||
virtual int GetPixels(bool reset = true) = 0;
|
virtual int GetPixels(bool reset = true) = 0;
|
||||||
|
@ -174,7 +174,7 @@ public:
|
||||||
|
|
||||||
// IRasterizer
|
// IRasterizer
|
||||||
|
|
||||||
void Queue(shared_ptr<GSRasterizerData> data);
|
void Queue(const shared_ptr<GSRasterizerData>& data);
|
||||||
void Sync() {}
|
void Sync() {}
|
||||||
bool IsSynced() const {return true;}
|
bool IsSynced() const {return true;}
|
||||||
int GetPixels(bool reset);
|
int GetPixels(bool reset);
|
||||||
|
@ -259,7 +259,7 @@ public:
|
||||||
|
|
||||||
// IRasterizer
|
// IRasterizer
|
||||||
|
|
||||||
void Queue(shared_ptr<GSRasterizerData> data);
|
void Queue(const shared_ptr<GSRasterizerData>& data);
|
||||||
void Sync();
|
void Sync();
|
||||||
bool IsSynced() const;
|
bool IsSynced() const;
|
||||||
int GetPixels(bool reset);
|
int GetPixels(bool reset);
|
||||||
|
|
Loading…
Reference in New Issue