Skip to content

Implement a mechanism to ivalidate SUOverlayRefs #1089

@noelwarren

Description

@noelwarren

This is a feature request related to the native SUOverlayRefs implementation.

We (and I would assume many other integrations leveraging SUOverlayRefs) recieve updates on artitrary threads and with to invalidate the view. Currently this is only available via the ruby api (Sketchup::View#invalidate) but because SketchUp's ruby api can only be executed safely on the main thread we have to defer or post this to the main thread. Something like:

deferrer->post([](void*) {
	rb_eval_string("Sketchup.active_model&.active_view&.invalidate");
}, nullptr);

This is not optimal.

  1. post to main thread
    ... wait for main thread to execute ruby
  2. execute ruby, invalidating the view
    ... wait for main thread to redraw overlays
  3. redraw overlay

There should be some thread safe way to invalidate the view for the overlay.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions