Skip to content

Commit

Permalink
Disabled MarkCurrentPendingTile() when auto-refresh is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
buddhi1980 committed Aug 22, 2017
1 parent a207aca commit a47db5f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions mandelbulber2/src/opencl_engine_render_fractal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ cOpenClEngineRenderFractal::cOpenClEngineRenderFractal(cOpenClHardware *_hardwar
dynamicData = new cOpenClDynamicData;

optimalJob.sizeOfPixel = sizeof(sClPixel);
autoRefreshMode = false;

#endif
}
Expand Down Expand Up @@ -383,6 +384,9 @@ void cOpenClEngineRenderFractal::SetParameters(const cParameterContainer *paramC

inBuffer = dynamicData->GetData();

//---------------- another parameters -------------
autoRefreshMode = paramContainer->Get<bool>("auto_refresh");

delete tempRenderWorker;
}

Expand Down Expand Up @@ -522,8 +526,12 @@ bool cOpenClEngineRenderFractal::Render(cImage *image, bool *stopRequest)
optimalJob.optimalProcessingCycle = 2.0 * timerImageRefresh.elapsed() / 1000.0;
if (optimalJob.optimalProcessingCycle < 0.1) optimalJob.optimalProcessingCycle = 0.1;
}
QRect currentCorners(jobX, jobY, jobWidth2, jobHeight2);
MarkCurrentPendingTile(image, currentCorners);

if (!autoRefreshMode)
{
QRect currentCorners(jobX, jobY, jobWidth2, jobHeight2);
MarkCurrentPendingTile(image, currentCorners);
}

if (!ReadBuffersFromQueue()) return false;

Expand Down Expand Up @@ -663,7 +671,7 @@ void cOpenClEngineRenderFractal::MarkCurrentPendingTile(cImage *image, QRect cor
}
image->PutPixelImage(xx, yy, border ? sRGBFloat(1, 1, 1) : sRGBFloat(0, 0, 0));
image->PutPixelColor(xx, yy, sRGB8(255, 255, 255));
image->PutPixelOpacity(xx, yy, 65536);
image->PutPixelOpacity(xx, yy, 65535);
image->PutPixelAlpha(xx, yy, 1);
}
}
Expand Down
1 change: 1 addition & 0 deletions mandelbulber2/src/opencl_engine_render_fractal.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class cOpenClEngineRenderFractal : public cOpenClEngine
cOpenClDynamicData *dynamicData;

QStringList listOfUsedFormulas;
bool autoRefreshMode;

#endif

Expand Down

0 comments on commit a47db5f

Please sign in to comment.