79 int *process_patch_padding,
86 const char *patch_buffer_name,
87 const char *mask_buffer_name);
91 int current_full_w,
int current_full_h,
int src_w,
int src_h,
92 int module_origin_x,
int module_origin_y,
97 int current_full_w,
int current_full_h,
102 int current_full_w,
int current_full_h,
103 int *module_origin_x,
int *module_origin_y);
110 gboolean *direct_copy);
114 int process_patch_padding,
116 float *layerbuf,
int layerbuf_width);
124 int patch_width,
int patch_height,
125 gboolean *process_patch_valid,
126 gboolean *process_patch_dirty,
128 int *process_patch_padding,
130 const char *patch_buffer_name,
131 const char *mask_buffer_name);
139 float **process_update_pixels,
140 size_t *process_update_capacity_pixels,
141 gboolean *cache_dirty, gboolean *process_patch_dirty,
143 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 src/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 src/iop/drawlayer/cache.c:187
void dt_drawlayer_cache_patch_wrunlock(const dt_drawlayer_cache_patch_t *patch)
Release write lock on shared patch cache entry.
Definition src/iop/drawlayer/cache.c:180
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 src/iop/drawlayer/cache.c:200
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 src/iop/drawlayer/cache.c:535
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 src/iop/drawlayer/cache.c:263
void dt_drawlayer_cache_patch_wrlock(const dt_drawlayer_cache_patch_t *patch)
Acquire write lock on shared patch cache entry.
Definition src/iop/drawlayer/cache.c:173
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 src/iop/drawlayer/cache.c:341
void dt_drawlayer_cache_patch_clear(dt_drawlayer_cache_patch_t *patch, const char *external_alloc_name)
Drop patch storage and clear metadata.
Definition src/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 src/iop/drawlayer/cache.c:403
void * dt_drawlayer_cache_alloc_temp_buffer(size_t bytes, const char *name)
Allocate a temporary RGBA scratch buffer.
Definition src/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 src/iop/drawlayer/cache.c:376
void dt_drawlayer_cache_clear_transparent_float(float *pixels, size_t pixel_count)
Fill RGBA float buffer with transparent black.
Definition src/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 src/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 src/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 src/iop/drawlayer/cache.c:317
void dt_drawlayer_cache_patch_rdlock(const dt_drawlayer_cache_patch_t *patch)
Acquire read lock on shared patch cache entry.
Definition src/iop/drawlayer/cache.c:159
gboolean dt_drawlayer_cache_ensure_mask_buffer(dt_drawlayer_cache_patch_t *mask, int width, int height, const char *name)
Ensure a float stroke-mask buffer exists for the requested size.
Definition src/iop/drawlayer/cache.c:123
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 src/iop/drawlayer/cache.c:294
void dt_drawlayer_cache_patch_rdunlock(const dt_drawlayer_cache_patch_t *patch)
Release read lock on shared patch cache entry.
Definition src/iop/drawlayer/cache.c:166
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:75
Definition pixelpipe_hb.h:96
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
Region of interest passed through the pixelpipe.
Definition imageop.h:72
Definition pixelpipe_cache.h:87