1 // Copyright (c) the JPEG XL Project Authors. All rights reserved. 2 // 3 // Use of this source code is governed by a BSD-style 4 // license that can be found in the LICENSE file. 5 6 #ifndef LIB_JXL_RENDER_PIPELINE_LOW_MEMORY_RENDER_PIPELINE_H_ 7 #define LIB_JXL_RENDER_PIPELINE_LOW_MEMORY_RENDER_PIPELINE_H_ 8 9 #include <stdint.h> 10 11 #include "lib/jxl/filters.h" 12 #include "lib/jxl/render_pipeline/render_pipeline.h" 13 14 namespace jxl { 15 16 // A multithreaded, low-memory rendering pipeline that only allocates a minimal 17 // amount of buffers. 18 class LowMemoryRenderPipeline : public RenderPipeline { 19 std::vector<std::pair<ImageF*, Rect>> PrepareBuffers( 20 size_t group_id, size_t thread_id) override; 21 22 void PrepareForThreadsInternal(size_t num) override; 23 24 void ProcessBuffers(size_t group_id, size_t thread_id) override; 25 }; 26 27 } // namespace jxl 28 29 #endif // LIB_JXL_RENDER_PIPELINE_LOW_MEMORY_RENDER_PIPELINE_H_ 30