diff options
Diffstat (limited to 'source/blender/editors/render/render_preview.c')
-rw-r--r-- | source/blender/editors/render/render_preview.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 1427c6ed500..fc22e3cd3e0 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -167,7 +167,7 @@ typedef struct ShaderPreview { float color[4]; int sizex, sizey; - unsigned int *pr_rect; + uint *pr_rect; int pr_method; bool own_id_copy; @@ -178,7 +178,7 @@ typedef struct ShaderPreview { typedef struct IconPreviewSize { struct IconPreviewSize *next, *prev; int sizex, sizey; - unsigned int *rect; + uint *rect; } IconPreviewSize; typedef struct IconPreview { @@ -621,14 +621,14 @@ static bool ed_preview_draw_rect(ScrArea *sa, int split, int first, rcti *rect, newrect->ymax = max_ii(newrect->ymax, rect->ymin + rres.recty); if (rres.rectx && rres.recty) { - unsigned char *rect_byte = MEM_mallocN(rres.rectx * rres.recty * sizeof(int), - "ed_preview_draw_rect"); + uchar *rect_byte = MEM_mallocN(rres.rectx * rres.recty * sizeof(int), + "ed_preview_draw_rect"); float fx = rect->xmin + offx; float fy = rect->ymin; /* material preview only needs monoscopy (view 0) */ if (re) { - RE_AcquiredResultGet32(re, &rres, (unsigned int *)rect_byte, 0); + RE_AcquiredResultGet32(re, &rres, (uint *)rect_byte, 0); } IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR); @@ -1014,10 +1014,10 @@ static void shader_preview_free(void *customdata) /* ************************* icon preview ********************** */ -static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned int *rect) +static void icon_copy_rect(ImBuf *ibuf, uint w, uint h, uint *rect) { struct ImBuf *ima; - unsigned int *drect, *srect; + uint *drect, *srect; float scaledx, scaledy; short ex, ey, dx, dy; @@ -1144,7 +1144,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat br->icon_imbuf = get_brush_icon(br); - memset(sp->pr_rect, 0x88, sp->sizex * sp->sizey * sizeof(unsigned int)); + memset(sp->pr_rect, 0x88, sp->sizex * sp->sizey * sizeof(uint)); if (!(br->icon_imbuf) || !(br->icon_imbuf->rect)) { return; @@ -1193,7 +1193,7 @@ static void common_preview_startjob(void *customdata, /* exported functions */ -static void icon_preview_add_size(IconPreview *ip, unsigned int *rect, int sizex, int sizey) +static void icon_preview_add_size(IconPreview *ip, uint *rect, int sizex, int sizey) { IconPreviewSize *cur_size = ip->sizes.first, *new_size; @@ -1324,8 +1324,7 @@ static void icon_preview_free(void *customdata) MEM_freeN(ip); } -void ED_preview_icon_render( - Main *bmain, Scene *scene, ID *id, unsigned int *rect, int sizex, int sizey) +void ED_preview_icon_render(Main *bmain, Scene *scene, ID *id, uint *rect, int sizex, int sizey) { IconPreview ip = {NULL}; short stop = false, update = false; @@ -1348,13 +1347,8 @@ void ED_preview_icon_render( BLI_freelistN(&ip.sizes); } -void ED_preview_icon_job(const bContext *C, - void *owner, - ID *id, - unsigned int *rect, - int sizex, - int sizey, - const bool delay) +void ED_preview_icon_job( + const bContext *C, void *owner, ID *id, uint *rect, int sizex, int sizey, const bool delay) { wmJob *wm_job; IconPreview *ip, *old_ip; |