message: oops fix build, missed file.
  remove dependency on JobSystem.h in public header
  this should fix
diff: * limitations under the License.
  */
  -#ifndef TNT_CUBEMAPUTILSIMPL_H
  -#define TNT_CUBEMAPUTILSIMPL_H
  +#ifndef IBL_CUBEMAPUTILSIMPL_H
  +#define IBL_CUBEMAPUTILSIMPL_H
  -#endif //TNT_CUBEMAPUTILSIMPL_H
  +#include <ibl/CubemapUtils.h>
  +
  +#include <utils/JobSystem.h>
  +
  +namespace filament {
  +namespace ibl {
  +
  +template<typename STATE>
  +void CubemapUtils::process(
  + Cubemap& cm,
  + CubemapUtils::ScanlineProc<STATE> proc,
  + ReduceProc<STATE> reduce,
  + const STATE& prototype) {
  + using namespace utils;
  +
  + JobSystem& js = getJobSystem();
  +
  + const size_t dim = cm.getDimensions();
  +
  + // multithread only on large-ish cubemaps
  + STATE states[6];
  + for (STATE& s : states) {
  + s = prototype;
  + }
  +
  + JobSystem::Job* parent = js.createJob();
  + for (size_t faceIndex = 0; faceIndex < 6; faceIndex++) {
  + const Cubemap::Face f = (Cubemap::Face)faceIndex;
  + JobSystem::Job* face = jobs::createJob(js, parent,
  + [faceIndex, &states, f, &cm, &dim, &proc]
  + (utils::JobSystem& js, utils::JobSystem::Job* parent) {
  + STATE& s = states[faceIndex];
  + Image& image(cm.getImageForFace(f));
  +
  + auto parallelJobTask = [&image, &proc, &s, dim, f](size_t y0, size_t c) {
  + for (size_t y = y0; y < y0 + c; y++) {
  + Cubemap::Texel* data =
  + static_cast<Cubemap::Texel*>(image.getPixelRef(0, y));
  + proc(s, y, f, data, dim);
  + }
  + };
  +
  + if (std::is_same<STATE, CubemapUtils::EmptyState>::value) {
  + auto job = jobs::parallel_for(js, parent, 0, uint32_t(dim),
  + std::ref(parallelJobTask), jobs::CountSplitter<1, 8>());
  +
  + // we need to wait here because parallelJobTask is passed by reference
  + js.runAndWait(job);
  + } else {
  + // if we have a per-thread STATE, we can't parallel_for()
  + parallelJobTask(0, dim);
  + }
  + }, std::ref(js), parent);
  + js.run(face);
  + }
  + // wait for all our threads to finish
  + js.runAndWait(parent);
  +
  + for (STATE& s : states) {
  + reduce(s);
  + }
  +}
  +
  +} // namespace ibl
  +} // namespace filament
  +
  +#endif // IBL_CUBEMAPUTILSIMPL_H
  