Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pan at full resolution and fix iso12646 white border jumps #15084

Merged
merged 5 commits into from Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/develop/develop.c
Expand Up @@ -247,8 +247,6 @@ void dt_dev_process_preview(dt_develop_t *dev)

void dt_dev_process_preview2(dt_develop_t *dev)
{
if(!dev->gui_attached) return;
if(!(dev->second_window.widget && GTK_IS_WIDGET(dev->second_window.widget))) return;
const int err = dt_control_add_job_res(darktable.control,
dt_dev_process_preview2_job_create(dev),
DT_CTL_WORKER_ZOOM_2);
Expand Down
2 changes: 1 addition & 1 deletion src/libs/duplicate.c
Expand Up @@ -230,7 +230,7 @@ void gui_post_expose(dt_lib_module_t *self,

if(d->preview_surf)
dt_view_paint_surface(cri, width, height, d->preview_surf,
d->processed_width, d->processed_height, DT_WINDOW_MAIN);
d->processed_width, d->processed_height, DT_WINDOW_MAIN, 0, 0, 0);
}

static void _thumb_remove(gpointer user_data)
Expand Down
14 changes: 7 additions & 7 deletions src/libs/snapshots.c
Expand Up @@ -49,6 +49,7 @@ typedef struct dt_lib_snapshot_t
/* snapshot cairo surface */
cairo_surface_t *surface;
uint32_t width, height;
float zoom_x, zoom_y;
} dt_lib_snapshot_t;

typedef struct dt_lib_snapshot_params_t
Expand Down Expand Up @@ -186,16 +187,16 @@ void gui_post_expose(dt_lib_module_t *self,
// export image with proper size
dt_dev_image_ext(snap->imgid, width, height, snap->history_end,
&d->params.buf, &d->params.width, &d->params.height,
darktable.develop->border_size,
darktable.develop->iso_12646.enabled,
snap->id);
dev->border_size, dev->iso_12646.enabled, snap->id);

if(snap->surface) cairo_surface_destroy(snap->surface);
snap->surface = dt_view_create_surface(d->params.buf,
d->params.width, d->params.height);

snap->width = d->params.width;
snap->height = d->params.height;
snap->zoom_x = dev->pipe->backbuf_zoom_x;
snap->zoom_y = dev->pipe->backbuf_zoom_y;
d->snap_requested = FALSE;
d->expose_again_timeout_id = -1;
}
Expand All @@ -215,8 +216,6 @@ void gui_post_expose(dt_lib_module_t *self,
snap->ctx = ctx;
if(!d->panning && dev->darkroom_mouse_in_center_area) d->snap_requested = TRUE;
if(d->expose_again_timeout_id != -1) g_source_remove(d->expose_again_timeout_id);
if(snap->surface) cairo_surface_destroy(snap->surface);
snap->surface = NULL;
d->expose_again_timeout_id = g_timeout_add(150, _snap_expose_again, d);
}

Expand Down Expand Up @@ -252,11 +251,12 @@ void gui_post_expose(dt_lib_module_t *self,
cairo_clip(cri);
cairo_fill(cri);

if(snap->surface && !d->snap_requested)
if(snap->surface)
{
// display snapshot image surface
dt_view_paint_surface(cri, width, height,
snap->surface, snap->width, snap->height, DT_WINDOW_MAIN);
snap->surface, snap->width, snap->height, DT_WINDOW_MAIN,
dev->pipe->backbuf_scale, snap->zoom_x, snap->zoom_y);
}

cairo_reset_clip(cri);
Expand Down