Skip to content

Commit

Permalink
ViewerInstance: do not take write lock at each render
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Mar 21, 2018
1 parent 02ea16a commit e897d30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- Fix crash when Viewer/maxNodeUiOpened=1 in the preferences
- Fix bug where an exported PyPlug would not have a correct Python syntax if a string had a backslash followed by newline (as may be seen in Shadertoy sources).
- Fix behaviour of loop/bounce in the Read node when there is a time offset #1734.
- G'MIC plugins by Tobias Fleischer are now bundled with the binary distributions.
- G'MIC plugins by Tobias Fleischer are now bundled with the binary distributions (beta).
- Fix bug where the "&" character was not displayed in the plugin creation menus.


Expand Down
5 changes: 5 additions & 0 deletions Engine/ViewerInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,12 @@ ViewerInstance::setupMinimalUpdateViewerParams(const SequenceTime time,
}

// Fill the gamma LUT if it has never been filled yet
bool gammaLookupEmpty;
{
QReadLocker k(&_imp->gammaLookupMutex);
gammaLookupEmpty = _imp->gammaLookup.empty();
}
if (gammaLookupEmpty) {
QWriteLocker k(&_imp->gammaLookupMutex);
if ( _imp->gammaLookup.empty() ) {
_imp->fillGammaLut(outArgs->params->gamma);
Expand Down

0 comments on commit e897d30

Please sign in to comment.