Commit Graph

90 Commits

Author SHA1 Message Date
a2c107aef1 Code cleanup: use 'const' for arrays (blenkernel) 2014-04-27 00:25:15 +10:00
d1b1d194dc Fix for half pixel offset rasterizing masks 2014-04-16 23:25:10 +10:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
0319db1063 Correct own recent changes broke release builds 2014-03-30 20:35:59 +11:00
27e86ed832 Code cleanup: use bools 2014-03-20 22:56:28 +11:00
1af726a82e Mask: fix for intel openmp which doesn't support casts in for loops 2014-02-17 21:37:56 +11:00
f9b51f0635 Clear +x flag from source file 2014-02-17 13:18:22 +06:00
78bd029bbe MSVC: add errors for BLI_strict_flags.h 2014-02-16 14:50:15 +11:00
ae8327dbf3 Mask: add option to detect self intersections 2014-02-13 19:12:28 +11:00
108ad34429 Mask: option not to treat overlapping curves as holes 2014-02-13 11:48:46 +11:00
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
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
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
62aa004c25 Style Cleanup: whitespace 2014-01-12 22:05:24 +11:00
c1c26c36f6 Style Cleanup: remove preprocessor indentation (updated wiki style guide too) 2013-12-22 14:12:19 +11:00
39daf283ae Don't use with_resol suffix for functions which doesn't get resolution 2013-12-20 16:00:05 +06:00
e220d3228f add MEM_SIZE_OPTIMAL to avoid memory fragmentation & waste lost to slop-space. 2013-10-10 18:18:13 +00:00
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
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
b7826c42df enable type limits warning when compiling with gcc. 2013-07-19 10:39:25 +00:00
8a40444d6b fix bad uses of sizeof() with memory allocation. 2013-07-13 05:43:35 +00:00
80ffe6f9b6 add strict conversion flags for mask_rasterize and reduce some signed/unsigned comparisons. 2013-06-22 23:37:45 +00:00
8238cd6992 use unsigned int, for mask rasterizer. 2013-05-08 12:54:47 +00:00
9ddf928dbd remove stringify macro from alloc's 2013-02-05 09:42:40 +00:00
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
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
9b948717b0 code cleanup: float <> double conversion. 2012-11-03 18:23:30 +00:00
eb69d1c1ae style cleanup: also quiet harmless compiler warning. 2012-10-29 15:43:54 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
7deb8d8a26 code cleanup: spelling 2012-10-20 20:36:51 +00:00
aa49ca25d5 incorrect spelling in comments 2012-09-26 20:05:38 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
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
4cb6d5d214 code cleanup: reduce calls to CTX_ functions inline, add some docs to mask rasterizer. 2012-09-13 01:50:21 +00:00
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
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
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
26f073b327 macros for rectangle center and size 2012-08-20 15:29:02 +00:00
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
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
33a9cafc3b quiet spacenav output on linux for regular builds, ifdef signed int for msvc openmp. 2012-07-31 21:26:14 +00:00
32bd936f18 Mask / Win64 compile fix: "Index variable in OpenMP 'for' statement must have signed integral type" 2012-07-31 19:37:33 +00:00
4473b846fb multi-threaded sequencer buffer calculation for masks. 2012-07-31 16:37:47 +00:00
4c02549d5d remove references to raskter from compositor and BKE mask. 2012-07-31 16:04:47 +00:00
2e51811950 use the same rasterizer as the compositor for the sequencer. 2012-07-31 15:45:01 +00:00
3ec212fd71 patch [#32195] MASKS: Canonical Porter Duff algorithm for merge missing.
from Troy Sobotka (sobotka)

This gives nicer blending then 'ADD', setting as default for new masks.
2012-07-28 11:36:01 +00:00
c8029bffd9 workaround for a bug with zero edges getting removed got feather faces out of sync and crashed 2012-07-18 16:24:13 +00:00
c0e004bd61 add difference blending mode, also fix error in last commit 2012-07-18 13:44:48 +00:00
73a778a4d0 change bucket size to give better performance for high detail 4k masks, also clamp from 0-1 for each layer when accumulating. 2012-07-18 13:34:14 +00:00
cfb3194945 code cleanup for mask capping 2012-07-18 12:54:13 +00:00