backend: invert color and dim doesn't need reg_op

We only ever invert color of or dim the entire image, so just remove the
ability to do region based inversion and dimming. Making implementing
image_op easier.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-03-09 13:37:32 +00:00
parent 60c10790d7
commit 6ff0facae6
3 changed files with 17 additions and 19 deletions

View File

@@ -23,10 +23,10 @@ typedef struct backend_base {
} backend_t;
enum image_operations {
// Invert the color of the image
IMAGE_OP_INVERT_COLOR,
// Dim the image, argument is the percentage
IMAGE_OP_DIM,
// Invert the color of the entire image, `reg_op` ignored
IMAGE_OP_INVERT_COLOR_ALL,
// Dim the entire image, argument is the percentage. `reg_op` ignored
IMAGE_OP_DIM_ALL,
// Multiply the alpha channel by the argument
IMAGE_OP_APPLY_ALPHA,
// Same as APPLY_ALPHA, but `reg_op` is ignored and the operation applies to the