76 int *process_patch_padding,
83 const char *patch_buffer_name,
84 const char *mask_buffer_name);
88 int current_full_w,
int current_full_h,
int src_w,
int src_h,
89 int module_origin_x,
int module_origin_y,
94 int current_full_w,
int current_full_h,
99 int current_full_w,
int current_full_h,
100 int *module_origin_x,
int *module_origin_y);
107 gboolean *direct_copy);
111 int process_patch_padding,
113 float *layerbuf,
int layerbuf_width);
121 int patch_width,
int patch_height,
122 gboolean *process_patch_valid,
123 gboolean *process_patch_dirty,
125 int *process_patch_padding,
127 const char *patch_buffer_name,
128 const char *mask_buffer_name);
136 float **process_update_pixels,
137 size_t *process_update_capacity_pixels,
138 gboolean *cache_dirty, gboolean *process_patch_dirty,
140 const char *update_buffer_name);
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
gboolean dt_drawlayer_cache_patch_alloc_shared(dt_drawlayer_cache_patch_t *patch, uint64_t hash, size_t pixel_count, int width, int height, const char *name, int *created_out)
Allocate/reuse shared patch storage from pixel cache.
Definition iop/drawlayer/cache.c:87
void dt_drawlayer_cache_invalidate_process_patch_state(gboolean *process_patch_valid, gboolean *process_patch_dirty, dt_drawlayer_damaged_rect_t *process_dirty_rect, int *process_patch_padding, dt_iop_roi_t *process_combined_roi)
Reset process-patch validity/dirty state bookkeeping.
Definition iop/drawlayer/cache.c:161
void dt_drawlayer_cache_patch_wrunlock(const dt_drawlayer_cache_patch_t *patch)
Release write lock on shared patch cache entry.
Definition iop/drawlayer/cache.c:153
gboolean dt_drawlayer_cache_ensure_process_patch_buffer(dt_drawlayer_cache_patch_t *process_patch, dt_drawlayer_cache_patch_t *process_stroke_mask, int width, int height, const char *patch_buffer_name, const char *mask_buffer_name)
Ensure process patch and its stroke mask buffers are allocated.
Definition iop/drawlayer/cache.c:174
gboolean dt_drawlayer_cache_flush_process_patch_to_base(dt_drawlayer_cache_patch_t *base_patch, dt_drawlayer_cache_patch_t *base_stroke_mask, const dt_iop_roi_t *process_combined_roi, dt_drawlayer_cache_patch_t *process_patch, dt_drawlayer_cache_patch_t *process_stroke_mask, float **process_update_pixels, size_t *process_update_capacity_pixels, gboolean *cache_dirty, gboolean *process_patch_dirty, dt_drawlayer_damaged_rect_t *process_dirty_rect, const char *update_buffer_name)
Flush dirty process-patch region back into base patch.
Definition iop/drawlayer/cache.c:519
void dt_drawlayer_cache_build_combined_process_roi(const dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *process_roi, int current_full_w, int current_full_h, int src_w, int src_h, int module_origin_x, int module_origin_y, dt_iop_roi_t *combined_roi)
Build process+padding ROI in module-buffer coordinates.
Definition iop/drawlayer/cache.c:237
void dt_drawlayer_cache_patch_wrlock(const dt_drawlayer_cache_patch_t *patch)
Acquire write lock on shared patch cache entry.
Definition iop/drawlayer/cache.c:145
gboolean dt_drawlayer_cache_build_process_blend_rois(const dt_drawlayer_cache_patch_t *process_patch, int process_patch_padding, const dt_iop_roi_t *roi_out, dt_iop_roi_t *blend_target_roi, dt_iop_roi_t *source_process_roi, gboolean *direct_copy)
Build blend/source ROIs from process patch and output ROI.
Definition iop/drawlayer/cache.c:315
void dt_drawlayer_cache_patch_clear(dt_drawlayer_cache_patch_t *patch, const char *external_alloc_name)
Drop patch storage and clear metadata.
Definition iop/drawlayer/cache.c:65
gboolean dt_drawlayer_cache_populate_process_patch_from_base(const dt_drawlayer_cache_patch_t *base_patch, const dt_drawlayer_cache_patch_t *base_stroke_mask, dt_drawlayer_cache_patch_t *process_patch, dt_drawlayer_cache_patch_t *process_stroke_mask, const dt_iop_roi_t *combined_roi, int process_pad, int patch_width, int patch_height, gboolean *process_patch_valid, gboolean *process_patch_dirty, dt_drawlayer_damaged_rect_t *process_dirty_rect, int *process_patch_padding, dt_iop_roi_t *process_combined_roi, const char *patch_buffer_name, const char *mask_buffer_name)
Populate process patch from base patch with crop/scale and synchronized stroke mask.
Definition iop/drawlayer/cache.c:377
void * dt_drawlayer_cache_alloc_temp_buffer(size_t bytes, const char *name)
Allocate a temporary RGBA scratch buffer.
Definition iop/drawlayer/cache.c:28
gboolean dt_drawlayer_cache_resample_process_patch_to_output(const dt_drawlayer_cache_patch_t *process_patch, int process_patch_padding, const dt_iop_roi_t *roi_out, float *layerbuf, int layerbuf_width)
Resample process patch into output layer buffer ROI.
Definition iop/drawlayer/cache.c:350
void dt_drawlayer_cache_clear_transparent_float(float *pixels, size_t pixel_count)
Fill RGBA float buffer with transparent black.
Definition iop/drawlayer/cache.c:58
float * dt_drawlayer_cache_ensure_scratch_buffer(float **buffer, size_t *capacity_pixels, size_t needed_pixels, const char *name)
Ensure a float RGBA scratch buffer capacity in pixels.
Definition iop/drawlayer/cache.c:42
void dt_drawlayer_cache_free_temp_buffer(void **buffer, const char *name)
Release temporary scratch buffer allocated by cache helpers.
Definition iop/drawlayer/cache.c:35
void dt_drawlayer_cache_build_combined_process_roi_for_piece(const dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *process_roi, int current_full_w, int current_full_h, int src_w, int src_h, dt_iop_roi_t *combined_roi)
Convenience wrapper using piece ROI offsets as module origin.
Definition iop/drawlayer/cache.c:291
void dt_drawlayer_cache_patch_rdlock(const dt_drawlayer_cache_patch_t *patch)
Acquire read lock on shared patch cache entry.
Definition iop/drawlayer/cache.c:129
void dt_drawlayer_cache_resolve_piece_input_origin(const dt_dev_pixelpipe_iop_t *piece, int current_full_w, int current_full_h, int *module_origin_x, int *module_origin_y)
Resolve effective module input origin, including centered-fit fallback.
Definition iop/drawlayer/cache.c:268
void dt_drawlayer_cache_patch_rdunlock(const dt_drawlayer_cache_patch_t *patch)
Release read lock on shared patch cache entry.
Definition iop/drawlayer/cache.c:137
Stroke-level path sampling and runtime-state API for drawlayer.
Pixelpipe cache for storing intermediate results in the pixelpipe.
unsigned __int64 uint64_t
Definition strptime.c:74
Definition pixelpipe_hb.h:58
Generic float RGBA patch stored either in malloc memory or pixel cache.
Definition iop/drawlayer/cache.h:37
int y
Definition iop/drawlayer/cache.h:39
int x
Definition iop/drawlayer/cache.h:38
int height
Definition iop/drawlayer/cache.h:41
float * pixels
Definition iop/drawlayer/cache.h:42
int width
Definition iop/drawlayer/cache.h:40
dt_pixel_cache_entry_t * cache_entry
Definition iop/drawlayer/cache.h:43
gboolean external_alloc
Definition iop/drawlayer/cache.h:45
uint64_t cache_hash
Definition iop/drawlayer/cache.h:44
Integer axis-aligned rectangle in buffer coordinates.
Definition iop/drawlayer/paint.h:87
Definition pixelpipe_cache.h:78