Skip to content

Commit

Permalink
Implement module-in-focus process cache
Browse files Browse the repository at this point in the history
The standard pixelpipe cache offers *input* data for a module to be fully processed if all parameters including
blending stuff match.

This commit implements a single line cache per pixelpipe only effective for a module being in focus *and* doing
some blending.

Data are possibly read from this cache instead of the possibly costly module->process/_cl.
Possibly write to that cache if data were not valid before.

Fixes #18180
  • Loading branch information
jenshannoschwalm committed Jan 14, 2025
1 parent 57cc85c commit 15e16f2
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 50 deletions.
7 changes: 7 additions & 0 deletions src/develop/imageop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,13 @@ void dt_iop_request_focus(dt_iop_module_t *module)
dev->gui_module = module;
dev->focus_hash = TRUE;

dt_free_align(dev->full.pipe->bcache_data);
dev->full.pipe->bcache_data = NULL;
dt_free_align(dev->preview_pipe->bcache_data);
dev->preview_pipe->bcache_data = NULL;
dt_free_align(dev->preview2.pipe->bcache_data);
dev->preview2.pipe->bcache_data = NULL;

/* lets lose the focus of previous focus module*/
if(out_focus_module)
{
Expand Down
Loading

0 comments on commit 15e16f2

Please sign in to comment.