Sergey Sharybin
f21f18b572
Task scheduler: Use const qualifier in callbacks for parallel range
2018-01-10 12:53:59 +01:00
Sergey Sharybin
5614193745
Task scheduler: Use restrict pointer qualifier
...
Those pointers are never to be aliased, so let's be explicit about this and hope
compiler does save some CPU ticks.
2018-01-10 12:49:51 +01:00
Sergey Sharybin
4c4a7e84c6
Task scheduler: Use single parallel range function with more flexible function
...
Now all the fine-tuning is happening using parallel range settings structure,
which avoid passing long lists of arguments, allows extend fine-tuning further,
avoid having lots of various functions which basically does the same thing.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
d2708b0f73
Task scheduler: Get rid of extended version of parallel range callback
...
Wrap all arguments into TLS type of argument. Avoids some branching and also
makes it easier to extend things in the future.
2018-01-09 16:09:33 +01:00
Bastien Montagne
440aa2bf70
Cleanup: ImageEditor's mask drawing code was re-implementing BKE_maskrasterize_buffer!
...
So this deduplicates and simplifies code, yeah.
Also, as an odd bonus, new code seems slighly quicker than previous one
(about 5 to 10% quicker).
2017-11-26 19:18:12 +01:00
Bastien Montagne
06e64058dd
Removing OMP: BKE's mask_rasterize.c
...
Once again nothing much to say here, except that whole mask rendering
process from VSE is about 25% quicker now. ;)
2017-11-26 19:06:26 +01:00
Campbell Barton
c2f7cffd56
Add inverse-square falloff to bmesh, mask & compo.
2015-04-26 18:31:54 +10:00
Campbell Barton
7d040d2a08
Cleanup: use BLI_listbase_*** prefix for count,sort,sort_r
2014-11-16 13:57:58 +01:00
Campbell Barton
5e3e095e2e
Code Cleanup: use const
2014-07-12 09:09:24 +10:00
Campbell Barton
a2c107aef1
Code cleanup: use 'const' for arrays (blenkernel)
2014-04-27 00:25:15 +10:00
Campbell Barton
d1b1d194dc
Fix for half pixel offset rasterizing masks
2014-04-16 23:25:10 +10:00
Campbell Barton
617557b08e
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
2014-04-01 15:22:28 +11:00
Campbell Barton
0319db1063
Correct own recent changes broke release builds
2014-03-30 20:35:59 +11:00
Campbell Barton
27e86ed832
Code cleanup: use bools
2014-03-20 22:56:28 +11:00
Campbell Barton
1af726a82e
Mask: fix for intel openmp which doesn't support casts in for loops
2014-02-17 21:37:56 +11:00
Sergey Sharybin
f9b51f0635
Clear +x flag from source file
2014-02-17 13:18:22 +06:00
Campbell Barton
78bd029bbe
MSVC: add errors for BLI_strict_flags.h
2014-02-16 14:50:15 +11:00
Campbell Barton
ae8327dbf3
Mask: add option to detect self intersections
2014-02-13 19:12:28 +11:00
Campbell Barton
108ad34429
Mask: option not to treat overlapping curves as holes
2014-02-13 11:48:46 +11:00
Campbell Barton
6c17d2141b
Scanfill: optimize filling curves, text, masks - skip calculating holes
...
Support for tagging polygon numbers when adding scanfill data,
saves having to calculate connectivity afterwards (which can take approx half overall scanfill time for complex curves).
2014-02-05 05:27:01 +11:00
Campbell Barton
d900f5be55
Code cleanup: use bools where possible
2014-02-03 19:35:44 +11:00
Campbell Barton
4ae7ae6f2e
Code Cleanup: use bool for return values and correct comments
...
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11:00
Campbell Barton
62aa004c25
Style Cleanup: whitespace
2014-01-12 22:05:24 +11:00
Campbell Barton
c1c26c36f6
Style Cleanup: remove preprocessor indentation (updated wiki style guide too)
2013-12-22 14:12:19 +11:00
Sergey Sharybin
39daf283ae
Don't use with_resol suffix for functions which doesn't get resolution
2013-12-20 16:00:05 +06:00
Campbell Barton
e220d3228f
add MEM_SIZE_OPTIMAL to avoid memory fragmentation & waste lost to slop-space.
2013-10-10 18:18:13 +00:00
Campbell Barton
2924a02a35
move strict compiler checks into a header so its easier to manage in one place (pragmas were copied around).
...
also enable more strict warnings for BLF (which had some incorrect casts).
2013-09-01 00:46:04 +00:00
Campbell Barton
27df6a3b54
scanfill curves, ngons, masks had their own memarena code and would allocate a new one for every fill.
...
now use BLI_memarena and support passing the arena into the fill function, so the arena is re-used, when scanfill is called in a loop.
2013-08-28 02:07:54 +00:00
Campbell Barton
b7826c42df
enable type limits warning when compiling with gcc.
2013-07-19 10:39:25 +00:00
Campbell Barton
8a40444d6b
fix bad uses of sizeof() with memory allocation.
2013-07-13 05:43:35 +00:00
Campbell Barton
80ffe6f9b6
add strict conversion flags for mask_rasterize and reduce some signed/unsigned comparisons.
2013-06-22 23:37:45 +00:00
Campbell Barton
8238cd6992
use unsigned int, for mask rasterizer.
2013-05-08 12:54:47 +00:00
Campbell Barton
9ddf928dbd
remove stringify macro from alloc's
2013-02-05 09:42:40 +00:00
Campbell Barton
f0c1bc830c
add option to BLI_scanfill_calc() - BLI_SCANFILL_CALC_HOLES, gives some speedup for BMesh ngons which never have holes and ensures predictable triangle count (totvert - 2), which is needed for pre-calculating array size.
2012-12-27 06:39:27 +00:00
Campbell Barton
f9e339ef00
fix/workaround [ #33281 ] script goes into not responding
...
scanfill remove-doubles pass assumes ordered edges (as with curves), otherwise it can hang.
workaround this problem by skipping removing-doubles for mesh ngons, since this isnt such a common case as it is with curves and we can just not support it.
2012-11-26 23:18:04 +00:00
Campbell Barton
9b948717b0
code cleanup: float <> double conversion.
2012-11-03 18:23:30 +00:00
Campbell Barton
eb69d1c1ae
style cleanup: also quiet harmless compiler warning.
2012-10-29 15:43:54 +00:00
Campbell Barton
f70d2c65d8
rename api functions...
...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
Campbell Barton
7deb8d8a26
code cleanup: spelling
2012-10-20 20:36:51 +00:00
Campbell Barton
aa49ca25d5
incorrect spelling in comments
2012-09-26 20:05:38 +00:00
Campbell Barton
232571c61a
code cleanup: replace macro for BLI_rect size/center with inline functions.
2012-09-15 11:48:20 +00:00
Campbell Barton
e75f5c8208
quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
...
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
Campbell Barton
4cb6d5d214
code cleanup: reduce calls to CTX_ functions inline, add some docs to mask rasterizer.
2012-09-13 01:50:21 +00:00
Campbell Barton
56b28635e7
code cleanup: rename BLI_in_rctf() --> BLI_rctf_isect_pt(), to conform with our naming convention.
2012-08-23 18:25:45 +00:00
Campbell Barton
f67d0e63a4
add new mask blend mode: 'Merge Subtract'. gives better results when using feather on overlapping masks when one subtracts from another.
2012-08-22 11:58:59 +00:00
Campbell Barton
5e78327b92
fix for mask feather intersection checks not working right for non-filled, feathered masks.
...
now do intersection checks for both sides of the feather.
2012-08-20 16:34:14 +00:00
Campbell Barton
26f073b327
macros for rectangle center and size
2012-08-20 15:29:02 +00:00
Sergey Sharybin
b282b5275c
Mask feather self-intersection check
...
Enable self-intersection check for preview. In own tests average
time for this operation on mango files was ~0.0015sec, and it was
like 20 splines max which still gives pretty smooth performance
on my core quad machine.
Would think let's check how it works for now, if it'll give some
issues here, would just avoid tessellation on every redraw by
storing tessellation in some cache (probably in mask user).
Another change is related on a way which loop to collapse.
Changed length check with AABB size check. A bit slower but
should be a bit more predictable.
2012-08-06 13:53:38 +00:00
Campbell Barton
2044b62370
resolve some issues with curve resolution calculaction
...
- resolution could become so high that it would wrap around to a negative number, now check for small numbers before doing float division.
- resolution was being calculated in some cases when it already met the clamp value - now this is skipped.
2012-08-04 20:17:22 +00:00
Campbell Barton
33a9cafc3b
quiet spacenav output on linux for regular builds, ifdef signed int for msvc openmp.
2012-07-31 21:26:14 +00:00