paysages : Preview improvements.
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@315 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
parent
0aebb5afa7
commit
3c2137ded1
3 changed files with 16 additions and 5 deletions
6
TODO
6
TODO
|
@ -11,10 +11,10 @@ Technology Preview 2 :
|
||||||
- Improve curve editor.
|
- Improve curve editor.
|
||||||
- Water and terrain LOD moves with the camera, fix it like in the wanderer.
|
- Water and terrain LOD moves with the camera, fix it like in the wanderer.
|
||||||
- There should not have to be more preview threads than cpu cores.
|
- There should not have to be more preview threads than cpu cores.
|
||||||
- Add preview threads pausing (for rendering).
|
- Pause previews drawing of main window when a dialog is opened.
|
||||||
- Add preview chunks priority (for visible previews).
|
- Interrupt preview chunk renderings that will be discarded at commit, or that are no more visible.
|
||||||
- Interrupt preview chunk renderings that will be discarded at commit.
|
|
||||||
- Can't overwrite picture files (ILError).
|
- Can't overwrite picture files (ILError).
|
||||||
|
- Fix "RGB parameters out of range" on preview while moving render size fast in render tab.
|
||||||
|
|
||||||
Technology Preview 3 :
|
Technology Preview 3 :
|
||||||
- Restore render progress.
|
- Restore render progress.
|
||||||
|
|
|
@ -47,6 +47,11 @@ public:
|
||||||
{
|
{
|
||||||
_need_render = false;
|
_need_render = false;
|
||||||
|
|
||||||
|
if (!_preview->isVisible())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
QImage pixbuf = _preview->startChunkTransaction(_xstart, _ystart, _xsize, _ysize, &revision);
|
QImage pixbuf = _preview->startChunkTransaction(_xstart, _ystart, _xsize, _ysize, &revision);
|
||||||
|
|
||||||
for (int x = 0; x < _xsize; x++)
|
for (int x = 0; x < _xsize; x++)
|
||||||
|
@ -108,7 +113,7 @@ void PreviewDrawingThread::run()
|
||||||
while (_running)
|
while (_running)
|
||||||
{
|
{
|
||||||
_drawing_manager->performOneThreadJob();
|
_drawing_manager->performOneThreadJob();
|
||||||
QThread::usleep(50000);
|
QThread::usleep(5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +129,7 @@ PreviewDrawingManager::PreviewDrawingManager()
|
||||||
|
|
||||||
void PreviewDrawingManager::startThreads()
|
void PreviewDrawingManager::startThreads()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _thread_count * 3; i++)
|
for (int i = 0; i < _thread_count; i++)
|
||||||
{
|
{
|
||||||
PreviewDrawingThread* thread = new PreviewDrawingThread();
|
PreviewDrawingThread* thread = new PreviewDrawingThread();
|
||||||
_threads.append(thread);
|
_threads.append(thread);
|
||||||
|
@ -363,6 +368,11 @@ void BasePreview::handleRedraw()
|
||||||
lock_drawing->unlock();
|
lock_drawing->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BasePreview::showEvent(QShowEvent* event)
|
||||||
|
{
|
||||||
|
updateChunks();
|
||||||
|
}
|
||||||
|
|
||||||
void BasePreview::resizeEvent(QResizeEvent* event)
|
void BasePreview::resizeEvent(QResizeEvent* event)
|
||||||
{
|
{
|
||||||
QImage* image;
|
QImage* image;
|
||||||
|
|
|
@ -40,6 +40,7 @@ private:
|
||||||
void updateScaling();
|
void updateScaling();
|
||||||
void updateChunks();
|
void updateChunks();
|
||||||
|
|
||||||
|
void showEvent(QShowEvent* event);
|
||||||
void resizeEvent(QResizeEvent* event);
|
void resizeEvent(QResizeEvent* event);
|
||||||
void paintEvent(QPaintEvent* event);
|
void paintEvent(QPaintEvent* event);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue