Page MenuHome

LineArt: Use array instead of lists for edges pending occusion query
ClosedPublic

Authored by YimingWu (NicksBest) on May 16 2022, 7:38 AM.

Details

Summary

It turns out there's no practical use for separating different edge types before final occlusion stage, also using an array should be faster overall. So changed those lists into one pending array, it also made the iteration and occlusion task scheduling simpler.

Diff Detail

Repository
rB Blender

Event Timeline

YimingWu (NicksBest) requested review of this revision.May 16 2022, 7:38 AM
YimingWu (NicksBest) created this revision.
source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
269

I think you should replace Data here with Data in pending_edges.
Otherwise the here can be interpenetrated as if you are referring to other variables declared there as well

386

Ditto as above. Write out what here refers to.

I would also like a clarification on what "hold memory" means.
I guess you mean that this one doesn't "own" any allocated memory by itself?

415

Same here comment at the first one above.

source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
1750

I think instead of to_list it should be to_array, right?

1755

Array in the name here as well

1767

Same here.

YimingWu (NicksBest) marked 5 inline comments as done.

Fixed naming stuff. Also cleaned up unused variables.

This revision is now accepted and ready to land.May 17 2022, 3:41 PM