| 22 | } |
| 23 | |
| 24 | bool Tr2TexturePipeline::Execute( ImageIO::HostBitmap& result, const std::unordered_map<std::wstring, const ImageIO::HostBitmap*>& inputs, const Tr2TexturePipelineParams& params ) const |
| 25 | { |
| 26 | result.Destroy(); |
| 27 | |
| 28 | if( m_steps.empty() ) |
| 29 | { |
| 30 | CCP_LOGERR_CH( s_texturePipelineChannel, "Tr2TexturePipeline: no steps" ); |
| 31 | return false; |
| 32 | } |
| 33 | for( auto it = begin( m_steps ); it != end( m_steps ); ++it ) |
| 34 | { |
| 35 | ( *it )->Execute( result, inputs, params ); |
| 36 | } |
| 37 | |
| 38 | if( params.maxHeight || params.maxWidth ) |
| 39 | { |
| 40 | if( !Tr2TexturePipelineStepLimitSize::LimitSize( result, params.maxWidth, params.maxHeight ) ) |
| 41 | { |
| 42 | return false; |
| 43 | } |
| 44 | } |
| 45 | return true; |
| 46 | } |
| 47 | |
| 48 | std::vector<std::wstring> Tr2TexturePipeline::GetResourceDependenciesFromScript() const |
| 49 | { |
no test coverage detected