Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image.c
| Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | void ED_imapaint_dirty_region( | ||||
| BKE_image_mark_dirty(ima, ibuf); | BKE_image_mark_dirty(ima, ibuf); | ||||
| if (tmpibuf) { | if (tmpibuf) { | ||||
| IMB_freeImBuf(tmpibuf); | IMB_freeImBuf(tmpibuf); | ||||
| } | } | ||||
| } | } | ||||
| void imapaint_image_update( | void imapaint_image_update( | ||||
| SpaceImage *sima, Image *image, ImBuf *ibuf, ImageUser *iuser, short texpaint) | SpaceImage *sima, Image *image, ImBuf *ibuf, ImageUser *UNUSED(iuser), short texpaint) | ||||
| { | { | ||||
| if (imapaintpartial.x1 != imapaintpartial.x2 && imapaintpartial.y1 != imapaintpartial.y2) { | if (imapaintpartial.x1 != imapaintpartial.x2 && imapaintpartial.y1 != imapaintpartial.y2) { | ||||
| IMB_partial_display_buffer_update_delayed( | IMB_partial_display_buffer_update_delayed( | ||||
| ibuf, imapaintpartial.x1, imapaintpartial.y1, imapaintpartial.x2, imapaintpartial.y2); | ibuf, imapaintpartial.x1, imapaintpartial.y1, imapaintpartial.x2, imapaintpartial.y2); | ||||
| } | } | ||||
| if (ibuf->mipmap[0]) { | if (ibuf->mipmap[0]) { | ||||
| ibuf->userflags |= IB_MIPMAP_INVALID; | ibuf->userflags |= IB_MIPMAP_INVALID; | ||||
| } | } | ||||
| /* todo: should set_tpage create ->rect? */ | /* todo: should set_tpage create ->rect? */ | ||||
| if (texpaint || (sima && sima->lock)) { | if (texpaint || (sima && sima->lock)) { | ||||
| int w = imapaintpartial.x2 - imapaintpartial.x1; | int w = imapaintpartial.x2 - imapaintpartial.x1; | ||||
| int h = imapaintpartial.y2 - imapaintpartial.y1; | int h = imapaintpartial.y2 - imapaintpartial.y1; | ||||
| if (w && h) { | if (w && h) { | ||||
| /* Testing with partial update in uv editor too */ | /* Testing with partial update in uv editor too */ | ||||
| BKE_image_update_gputexture(image, iuser, imapaintpartial.x1, imapaintpartial.y1, w, h); | BKE_image_update_gpu_texture_delayed( | ||||
| image, ibuf, imapaintpartial.x1, imapaintpartial.y1, w, h); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* paint blur kernels. Projective painting enforces use of a 2x2 kernel due to lagging */ | /* paint blur kernels. Projective painting enforces use of a 2x2 kernel due to lagging */ | ||||
| BlurKernel *paint_new_blur_kernel(Brush *br, bool proj) | BlurKernel *paint_new_blur_kernel(Brush *br, bool proj) | ||||
| { | { | ||||
| int i, j; | int i, j; | ||||
| ▲ Show 20 Lines • Show All 1,185 Lines • Show Last 20 Lines | |||||