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:
Gregory Hainaut 2015-03-21 15:09:58 +01:00
parent 84b33d2ddb
commit d91e989abb
2 changed files with 5 additions and 5 deletions

View File

@ -104,7 +104,7 @@ int GSRasterizer::FindMyNextScanline(int top) const
return top;
}
void GSRasterizer::Queue(shared_ptr<GSRasterizerData> data)
void GSRasterizer::Queue(const shared_ptr<GSRasterizerData>& data)
{
Draw(data.get());
}
@ -1155,7 +1155,7 @@ GSRasterizerList::~GSRasterizerList()
_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);

View File

@ -119,7 +119,7 @@ class IRasterizer : public GSAlignedClass<32>
public:
virtual ~IRasterizer() {}
virtual void Queue(shared_ptr<GSRasterizerData> data) = 0;
virtual void Queue(const shared_ptr<GSRasterizerData>& data) = 0;
virtual void Sync() = 0;
virtual bool IsSynced() const = 0;
virtual int GetPixels(bool reset = true) = 0;
@ -174,7 +174,7 @@ public:
// IRasterizer
void Queue(shared_ptr<GSRasterizerData> data);
void Queue(const shared_ptr<GSRasterizerData>& data);
void Sync() {}
bool IsSynced() const {return true;}
int GetPixels(bool reset);
@ -259,7 +259,7 @@ public:
// IRasterizer
void Queue(shared_ptr<GSRasterizerData> data);
void Queue(const shared_ptr<GSRasterizerData>& data);
void Sync();
bool IsSynced() const;
int GetPixels(bool reset);