Skip to content

Add copy draw - #67

Open
jcupitt wants to merge 8 commits into
masterfrom
add-copy-draw
Open

Add copy draw#67
jcupitt wants to merge 8 commits into
masterfrom
add-copy-draw

Conversation

@jcupitt

@jcupitt jcupitt commented Sep 9, 2026

Copy link
Copy Markdown
Member

resync with nip4, again

@jcupitt

jcupitt commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@kleisauke I think this (no, really) might fix the info bar crash. I've not been able to make it fall over myself yet anyway.

You'll need the matching add-copy-draw libvips branch to test.

  • uses _copy_draw() and not _inplace(), so it should be more threadsafe
  • paint actions are mostly in-line now and don't trigger invalidation (you have to do this manually)
  • centralised progress reporting
  • much faster painting

@kleisauke

Copy link
Copy Markdown
Member

Great! I tried my best to make it crash, but it didn't, which is a good thing! :)

I only noticed one minor issue: the progress bar doesn't show when opening st-francis.jpg in the GUI, while vipsdisp st-francis.jpg works as expected. I suspect there's a missing gtk_action_bar_set_revealed() call somewhere.

I'll review the corresponding libvips PR later, but I noticed some CIFuzz failures there (not sure if you'd seen those).

@jcupitt

jcupitt commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Great! Thank you for testing!

Yes, I noticed the missing progress bar for "replace" too. I've not found a fix yet :(

I think it's something like event starvation: progress.c emits begin/update/end from an idle handler, and idle handlers won't run if the main thread is too busy.

@jcupitt

jcupitt commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Oh wait, "replace" isn't using the same load path, that's why it's starving events. I'll try to fix it.

we were not resetting last_update_time 🤦
@jcupitt

jcupitt commented Sep 11, 2026

Copy link
Copy Markdown
Member Author

Honestly, I wasn't resetting last_update_time sigh. It seems to be working now.

Comment thread src/progress.c Outdated
@kleisauke

Copy link
Copy Markdown
Member

Seems to be working great now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants