Page MenuHome

[WIP] GPencil: Refactor update handling - avoid copy-on-write
AbandonedPublic

Authored by Falk David (filedescriptor) on Dec 10 2021, 10:39 AM.

Details

Summary

This commits implements the first iteration of a new evaluation algorithm.
The idea is to always do a full copy of an element that was tagged with
GP_*_RECALC.

Note: This patch only handles drawing and some transform operators in edit mode.
Other operators might not work or not trigger an update. They will have to be implemented.

Demo with the example file from T91945 (12.9 million points):

3.1 Alpha from 2021-12-10:

There is a 1-2 second lag after each stroke is created.

Patch:

The lag after each stroke is a lot less severe but still noticeable. This is due to global undo. Disabling global undo will result in no noticeable lag.

Diff Detail

Repository
rB Blender
Branch
gpencil-refactor-update-handling (branched from master)
Build Status
Buildable 19348
Build 19348: arc lint + arc unit

Event Timeline

Falk David (filedescriptor) requested review of this revision.Dec 10 2021, 10:39 AM
Falk David (filedescriptor) created this revision.
Falk David (filedescriptor) edited the summary of this revision. (Show Details)
Falk David (filedescriptor) edited the summary of this revision. (Show Details)
  • Move call to update function into deg_update_copy_on_write_datablock

@Sergey Sharybin (sergey) Yes, this was the first prototype. Closing.