Beatmup
|
#include <swapper.h>
Public Member Functions | |
Swapper (bool fromGpuToCpu) | |
void | setBitmap (AbstractBitmap &) |
Public Member Functions inherited from Beatmup::AbstractTask | |
virtual void | beforeProcessing (ThreadIndex threadCount, ProcessingTarget target, GraphicPipeline *gpu) |
Instruction called before the task is executed. More... | |
virtual void | afterProcessing (ThreadIndex threadCount, GraphicPipeline *gpu, bool aborted) |
Instruction called after the task is executed. More... | |
Public Member Functions inherited from Beatmup::Object | |
virtual | ~Object () |
Static Public Member Functions | |
static void | pullPixels (AbstractBitmap &bitmap) |
Copies bitmap from GPU memory to RAM. More... | |
static void | pushPixels (AbstractBitmap &bitmap) |
Copies bitmap from RAM to GPU memory. More... | |
Static Public Member Functions inherited from Beatmup::AbstractTask | |
static ThreadIndex | validThreadCount (int number) |
Valid thread count from a given integer value. More... | |
Private Member Functions | |
bool | processOnGPU (GraphicPipeline &gpu, TaskThread &) |
Executes the task on GPU. More... | |
Private Attributes | |
AbstractBitmap * | bitmap |
bool | fromGpuToCpu |
Additional Inherited Members | |
Public Types inherited from Beatmup::AbstractTask | |
enum class | TaskDeviceRequirement { CPU_ONLY , GPU_OR_CPU , GPU_ONLY } |
Specifies which device (CPU and/or GPU) is used to run the task. More... | |
Swapper::Swapper | ( | bool | fromGpuToCpu | ) |
Definition at line 39 of file swapper.cpp.
|
privatevirtual |
Executes the task on GPU.
gpu | graphic pipeline instance |
thread | associated task execution context |
true
if the execution is finished correctly, false
otherwise Reimplemented from Beatmup::AbstractTask.
Definition at line 25 of file swapper.cpp.
void Swapper::setBitmap | ( | AbstractBitmap & | bitmap | ) |
Definition at line 43 of file swapper.cpp.
|
static |
Copies bitmap from GPU memory to RAM.
Definition at line 48 of file swapper.cpp.
|
static |
|
private |