diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/image_gen.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index ceb13c4955e..1a0cc8c2924 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -69,10 +69,11 @@ static void image_buf_fill_color_slice( } } -static void image_buf_fill_color_thread_do(void *data_v, int start_scanline, int num_scanlines) +static void image_buf_fill_color_thread_do(void *data_v, int scanline) { FillColorThreadData *data = (FillColorThreadData *)data_v; - size_t offset = ((size_t)start_scanline) * data->width * 4; + const int num_scanlines = 1; + size_t offset = ((size_t)scanline) * data->width * 4; unsigned char *rect = (data->rect != NULL) ? (data->rect + offset) : NULL; float *rect_float = (data->rect_float != NULL) ? (data->rect_float + offset) : NULL; image_buf_fill_color_slice(rect, rect_float, data->width, num_scanlines, data->color); @@ -197,13 +198,14 @@ typedef struct FillCheckerThreadData { int width; } FillCheckerThreadData; -static void image_buf_fill_checker_thread_do(void *data_v, int start_scanline, int num_scanlines) +static void image_buf_fill_checker_thread_do(void *data_v, int scanline) { FillCheckerThreadData *data = (FillCheckerThreadData *)data_v; - size_t offset = ((size_t)start_scanline) * data->width * 4; + size_t offset = ((size_t)scanline) * data->width * 4; + const int num_scanlines = 1; unsigned char *rect = (data->rect != NULL) ? (data->rect + offset) : NULL; float *rect_float = (data->rect_float != NULL) ? (data->rect_float + offset) : NULL; - image_buf_fill_checker_slice(rect, rect_float, data->width, num_scanlines, start_scanline); + image_buf_fill_checker_slice(rect, rect_float, data->width, num_scanlines, scanline); } void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int width, int height) @@ -444,16 +446,15 @@ typedef struct FillCheckerColorThreadData { int width, height; } FillCheckerColorThreadData; -static void checker_board_color_prepare_thread_do(void *data_v, - int start_scanline, - int num_scanlines) +static void checker_board_color_prepare_thread_do(void *data_v, int scanline) { FillCheckerColorThreadData *data = (FillCheckerColorThreadData *)data_v; - size_t offset = ((size_t)data->width) * start_scanline * 4; + const int num_scanlines = 1; + size_t offset = ((size_t)data->width) * scanline * 4; unsigned char *rect = (data->rect != NULL) ? (data->rect + offset) : NULL; float *rect_float = (data->rect_float != NULL) ? (data->rect_float + offset) : NULL; checker_board_color_prepare_slice( - rect, rect_float, data->width, num_scanlines, start_scanline, data->height); + rect, rect_float, data->width, num_scanlines, scanline, data->height); } void BKE_image_buf_fill_checker_color(unsigned char *rect, |