Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CImgPlugin, Flexible, image, CImg] Refactor CImg & CImgPlugin #562

Merged
merged 1 commit into from
Jan 18, 2018

Conversation

damienmarchal
Copy link
Contributor

@damienmarchal damienmarchal commented Jan 17, 2018

Refactor CImg & CImgPlugin and fix the code that depend on it.

The general problem is that CImg is header only library thus the
multiple inclusion of the code in multiple dll seems to cause trouble
on the mutexes initialization causing the crash & failure when two plugins compile
with CImg & CImgPlugin are loaded (eg image, flexible).

To avoid this scenario, CImg is moved into the CImgPlugin that
hold the mutex and other code needs to include #include<CImgPlugin/SOFACImg.h>
instead of the raw CImg.

This PR is resulting from the split of #548 (for clearity and to ease reviewing).


This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

…mgPlugin then fix the code that depends on it.

The general problem is that CImg is header only library thus the
multiple inclusion of the code in multiple dll seems to cause trouble
on the mutexes initialization causing the crash & failure when two plugins compile
with CImg & CImgPlugin are loaded (eg image, flexible).

To avoid this scenario, CImg is moved into the CImgPlugin that
hold the mutex and other code needs to include #include<CImgPlugin/SOFACImg.h>
instead of the raw CImg.
@damienmarchal
Copy link
Contributor Author

[ci-build][with-scene-tests]

@damienmarchal damienmarchal added this to the v17.12 milestone Jan 18, 2018
@damienmarchal damienmarchal added pr: fix Fix a bug pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status to review To notify reviewers to review this pull-request labels Jan 18, 2018
@damienmarchal
Copy link
Contributor Author

@guparan, @hugtalbot, @fredroy I have done the split of PR #548... Here is CImg related changed...
fix a serie of failing scene in Flexible.

@guparan guparan added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Jan 18, 2018
@guparan guparan merged commit a6e5729 into sofa-framework:master Jan 18, 2018
@damienmarchal damienmarchal deleted the fixCImgPlugin branch February 12, 2018 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants