20 #include "../parallelism.h"
21 #include "../geometry.h"
A very basic class for any image.
Task: an operation that can be executed by multiple threads in parallel.
Makes sure the bitmap content is accessible within an image processing task.
A task to clip images on CPU.
virtual bool process(TaskThread &)
Executes the task on CPU within a given thread.
IntRectangle cropRect
clip rect on input bitmap
void setOutput(AbstractBitmap *output)
virtual void afterProcessing(ThreadIndex, GraphicPipeline *, bool)
Instruction called after the task is executed.
static AbstractBitmap * run(AbstractBitmap &bitmap, IntRectangle clipRect)
Copies out a specified rect of a bitmap into another bitmap.
IntPoint outOrigin
origin on output bitmap
void setOutputOrigin(IntPoint)
Sets top-left position of the clip rectangle in output bitmap.
bool isFit() const
Checks if everything is fitted to make cropping.
virtual void beforeProcessing(ThreadIndex, ProcessingTarget target, GraphicPipeline *)
Instruction called before the task is executed.
void setCropRect(IntRectangle)
Sets crop rectangle in input bitmap.
ThreadIndex getMaxThreads() const
Gives the upper limint on the number of threads the task may be performed by.
AbstractBitmap * output
input and output bitmaps
void setInput(AbstractBitmap *input)
Internal low-level GPU control API.
unsigned char ThreadIndex
number of threads / thread index
Beatmup::InternalBitmap * bitmap