Files
OpenColorIO/tests/cpu/UnitTestOptimFlags.cpp
Bernard LefebvreandPatrick Hodoul e38fec8dc3 Adsk Contrib - Improve op finalization (#986)
* Review ops finalization.
- ops are only finalized once.
- clarify LUT inversion
- move direction to MatrixOpData and RangeOpData
- change how FixedFunction surround inverse is saved

Signed-off-by: Bernard Lefebvre <bernard.lefebvre@autodesk.com>

* Fix build after merge from main.
- adjust gpu test set-up.
- expose new api function to python.

Signed-off-by: Bernard Lefebvre <bernard.lefebvre@autodesk.com>

Co-authored-by: Patrick Hodoul <patrickhodoul@gmail.com>
2020-04-22 08:48:12 -04:00

24 lines
703 B
C++

// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.
#include <OpenColorIO/OpenColorIO.h>
#include "UnitTestOptimFlags.h"
#include "Platform.h"
namespace OCIO = OCIO_NAMESPACE;
OCIOOptimizationFlagsEnvGuard::OCIOOptimizationFlagsEnvGuard(const char * newValue)
{
std::string newString{ newValue ? newValue : "" };
m_optimizationFlagEnv = OCIO::GetEnvVariable(OCIO::OCIO_OPTIMIZATION_FLAGS_ENVVAR);
OCIO::SetEnvVariable(OCIO::OCIO_OPTIMIZATION_FLAGS_ENVVAR, newString.c_str());
}
OCIOOptimizationFlagsEnvGuard::~OCIOOptimizationFlagsEnvGuard()
{
OCIO::SetEnvVariable(OCIO::OCIO_OPTIMIZATION_FLAGS_ENVVAR, m_optimizationFlagEnv.c_str());
}