mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-17 11:10:45 +00:00
Disabled Multithreaded Renderer
This commit is contained in:
parent
de83d22523
commit
f9fbd84866
@ -1205,11 +1205,11 @@ gGraphView::gGraphView(QWidget *parent, gGraphView * shared) :
|
|||||||
masterlock=new QSemaphore(m_idealthreads);
|
masterlock=new QSemaphore(m_idealthreads);
|
||||||
|
|
||||||
m_tooltip=new gToolTip(this);
|
m_tooltip=new gToolTip(this);
|
||||||
for (int i=0;i<m_idealthreads;i++) {
|
/*for (int i=0;i<m_idealthreads;i++) {
|
||||||
gThread * gt=new gThread(this);
|
gThread * gt=new gThread(this);
|
||||||
m_threads.push_back(gt);
|
m_threads.push_back(gt);
|
||||||
gt->start();
|
//gt->start();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
lines=new GLBuffer(QColor(0,0,0,0),100000,GL_LINES); // big fat shared line list
|
lines=new GLBuffer(QColor(0,0,0,0),100000,GL_LINES); // big fat shared line list
|
||||||
backlines=new GLBuffer(QColor(0,0,0,0),10000,GL_LINES); // big fat shared line list
|
backlines=new GLBuffer(QColor(0,0,0,0),10000,GL_LINES); // big fat shared line list
|
||||||
@ -1474,14 +1474,14 @@ void gGraphView::paintGL()
|
|||||||
bool threaded;
|
bool threaded;
|
||||||
|
|
||||||
// Tempory hack using this pref..
|
// Tempory hack using this pref..
|
||||||
if (pref["EnableMultithreading"].toBool()) { // && (m_idealthreads>1)) {
|
/*if (pref["EnableMultithreading"].toBool()) { // && (m_idealthreads>1)) {
|
||||||
threaded=true;
|
threaded=true;
|
||||||
/*for (int i=0;i<m_idealthreads;i++) {
|
for (int i=0;i<m_idealthreads;i++) {
|
||||||
if (!m_threads[i]->isRunning())
|
if (!m_threads[i]->isRunning())
|
||||||
m_threads[i]->start();
|
m_threads[i]->start();
|
||||||
} */
|
}
|
||||||
} else threaded=false;
|
} else threaded=false; */
|
||||||
//threaded=false;
|
threaded=false;
|
||||||
for (int i=0;i<m_graphs.size();i++) {
|
for (int i=0;i<m_graphs.size();i++) {
|
||||||
if (m_graphs[i]->isEmpty() || !m_graphs[i]->visible()) continue;
|
if (m_graphs[i]->isEmpty() || !m_graphs[i]->visible()) continue;
|
||||||
numgraphs++;
|
numgraphs++;
|
||||||
@ -1512,7 +1512,7 @@ void gGraphView::paintGL()
|
|||||||
//int thr=m_idealthreads;
|
//int thr=m_idealthreads;
|
||||||
QTime time;
|
QTime time;
|
||||||
time.start();
|
time.start();
|
||||||
if (threaded) {
|
/*if (threaded) {
|
||||||
for (int i=0;i<m_idealthreads;i++) {
|
for (int i=0;i<m_idealthreads;i++) {
|
||||||
masterlock->acquire(1);
|
masterlock->acquire(1);
|
||||||
m_threads[i]->mutex.unlock();
|
m_threads[i]->mutex.unlock();
|
||||||
@ -1523,14 +1523,14 @@ void gGraphView::paintGL()
|
|||||||
masterlock->acquire(m_idealthreads);
|
masterlock->acquire(m_idealthreads);
|
||||||
masterlock->release(m_idealthreads);
|
masterlock->release(m_idealthreads);
|
||||||
|
|
||||||
} else { // just do it here
|
} else { // just do it here */
|
||||||
int s=m_drawlist.size();
|
int s=m_drawlist.size();
|
||||||
for (int i=0;i<s;i++) {
|
for (int i=0;i<s;i++) {
|
||||||
gGraph *g=m_drawlist.at(0);
|
gGraph *g=m_drawlist.at(0);
|
||||||
m_drawlist.pop_front();
|
m_drawlist.pop_front();
|
||||||
g->paint(g->m_lastbounds.x(), g->m_lastbounds.y(), g->m_lastbounds.width(), g->m_lastbounds.height());
|
g->paint(g->m_lastbounds.x(), g->m_lastbounds.y(), g->m_lastbounds.width(), g->m_lastbounds.height());
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
int elapsed=time.elapsed();
|
int elapsed=time.elapsed();
|
||||||
QColor col=Qt::black;
|
QColor col=Qt::black;
|
||||||
if (!numgraphs) {
|
if (!numgraphs) {
|
||||||
|
@ -415,7 +415,7 @@ protected:
|
|||||||
TextQue m_textque[textque_max];
|
TextQue m_textque[textque_max];
|
||||||
int m_textque_items;
|
int m_textque_items;
|
||||||
int m_lastxpos,m_lastypos;
|
int m_lastxpos,m_lastypos;
|
||||||
volatile int m_threadsrunning;
|
//volatile int m_threadsrunning;
|
||||||
|
|
||||||
QString m_emptytext;
|
QString m_emptytext;
|
||||||
signals:
|
signals:
|
||||||
|
@ -395,6 +395,9 @@ void MainWindow::on_oximetryButton_clicked()
|
|||||||
void MainWindow::on_actionEnable_Multithreading_toggled(bool checked)
|
void MainWindow::on_actionEnable_Multithreading_toggled(bool checked)
|
||||||
{
|
{
|
||||||
pref["EnableMultithreading"]=checked;
|
pref["EnableMultithreading"]=checked;
|
||||||
|
if (checked) {
|
||||||
|
qDebug() << "This feature is disabled due to it currently being useless.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionCheck_for_Updates_triggered()
|
void MainWindow::on_actionCheck_for_Updates_triggered()
|
||||||
|
Loading…
Reference in New Issue
Block a user