mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Reduce accuracy to decrease memory load.
This commit is contained in:
parent
5278bb29e6
commit
0519df4dfc
@ -2501,14 +2501,14 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover )
|
|||||||
if( m_tmpVecSize < sz )
|
if( m_tmpVecSize < sz )
|
||||||
{
|
{
|
||||||
delete[] m_tmpVec;
|
delete[] m_tmpVec;
|
||||||
m_tmpVec = new double[sz];
|
m_tmpVec = new float[sz];
|
||||||
m_tmpVecSize = sz;
|
m_tmpVecSize = sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto dst = m_tmpVec;
|
auto dst = m_tmpVec;
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
*dst++ = it->val;
|
*dst++ = float( it->val );
|
||||||
if( std::distance( it, range ) > skip )
|
if( std::distance( it, range ) > skip )
|
||||||
{
|
{
|
||||||
it += skip;
|
it += skip;
|
||||||
|
|||||||
@ -252,7 +252,7 @@ private:
|
|||||||
bool m_terminate;
|
bool m_terminate;
|
||||||
|
|
||||||
size_t m_tmpVecSize;
|
size_t m_tmpVecSize;
|
||||||
double* m_tmpVec;
|
float* m_tmpVec;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user