Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/intern/COM_WorkPackage.h
| Show All 17 Lines | |||||
| #pragma once | #pragma once | ||||
| #include "COM_Enums.h" | #include "COM_Enums.h" | ||||
| #include "BLI_rect.h" | #include "BLI_rect.h" | ||||
| #include <ostream> | #include <ostream> | ||||
| #include <functional> | |||||
| namespace blender::compositor { | namespace blender::compositor { | ||||
| // Forward Declarations. | // Forward Declarations. | ||||
| class ExecutionGroup; | class ExecutionGroup; | ||||
| /** | /** | ||||
| * \brief contains data about work that can be scheduled | * \brief contains data about work that can be scheduled | ||||
| * \see WorkScheduler | * \see WorkScheduler | ||||
| Show All 11 Lines | struct WorkPackage { | ||||
| */ | */ | ||||
| unsigned int chunk_number; | unsigned int chunk_number; | ||||
| /** | /** | ||||
| * Area of the execution group that the work package calculates. | * Area of the execution group that the work package calculates. | ||||
| */ | */ | ||||
| rcti rect; | rcti rect; | ||||
| std::function<void()> execute_fn; | |||||
| #ifdef WITH_CXX_GUARDEDALLOC | #ifdef WITH_CXX_GUARDEDALLOC | ||||
| MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkPackage") | MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkPackage") | ||||
| #endif | #endif | ||||
| }; | }; | ||||
| std::ostream &operator<<(std::ostream &os, const WorkPackage &work_package); | std::ostream &operator<<(std::ostream &os, const WorkPackage &work_package); | ||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||