Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
This is used to compute whether the regions in question overlap, but
nothing makes use of this information, so it can be removed.
|
|
The while part of a do/while loop was formatted as if it were a while
loop with an empty body. Probably some indent tool misinterpreted the
code at some point.
|
|
Declare functions *_inverse() and *_contains_rectangle() in the same
way as the other functions are declared. This doesn't imply any semantic
changes. It's just a unification of coding styles.
|
|
These functions simply reset the region to empty. They are equivalent
to
pixman_region_fini (®ion);
pixman_region_init (®ion);
|
|
This patch has been generated by the following Coccinelle semantic patch:
// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it
@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- free(E);
(
- E = NULL;
|
- E = 0;
)
...
- }
@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
- free (E);
- }
|
|
llvm-gcc (shipped in Apple XCode 4.1.1 as the default compiler or in
the 2.9 release of LLVM) performs an invalid optimization which
unifies the empty_region and the bad_region structures because they
have the same content.
A bugreport has been filed against Apple Developers Tool for this
issue. This commit works around this bug by making one of the two
structures volatile, so that it cannot be merged.
Fixes region-contains-test.
|
|
The same binary search from the previous commit can be used in this
function too.
V2: Remove check from loop that is not needed anymore, pointed out by
Andrea Canciani.
|
|
When someone selects some text in Firefox under a non-composited X
server and initiates a drag, a shaped window is created with a complex
shape corresponding to the outline of the text. Then, on every mouse
movement pixman_region_contains_rectangle() is called many times on
that complicated region. And pixman_region_contains_rectangle() is
doing a linear scan through the rectangles in the region, although the
scan does exit when it finds the first box that can't possibly
intersect the passed-in rectangle.
This patch changes the loop so that it uses a binary search to skip
boxes that don't overlap the current y position. The performance
improvement for the text dragging case is easily noticable.
V2: Use the binary search for the "getting up to speed or skippping
remainder of band" as well.
|
|
So the check of 'reg->data' pointer can be safely removed.
|
|
Fixes the region-translate test case by clipping region translations to
the newly defined PIXMAN_REGION_MIN/MAX and using the newly introduced
type overflow_int_t to check for the overflow.
Also uses INT16_MAX or INT32_MAX for these values instead of relying on
the size of short and int types.
|
|
|
|
This reverts commit ebba1493136a5a0dd7667073165b2115de203eda.
Scheduled for re-discussion after stable 0.18 has been released.
|
|
Fixes Novell bug 568811.
|
|
Rather than the region code having its own little debug system, move
all of it into pixman-private where there is already return_if_fail()
macros etc. These macros are now enabled in development snapshots and
nowhere else. Previously they were never enabled unless you modified
the code.
At the same time, remove all the asserts from the region code since we
can never turn them on anyway, and replace them with
critical_if_fail() macros that will print spew to standard error when
DEBUG is defined.
Finally, also change the debugging spew in pixman-bits-image.c to use
return_val_if_fail() instead of its own fprintf().
|
|
This creates a region from an image in PIXMAN_a1 format.
|
|
There is not much real benefit in having asserts turned on in
snapshots because it doesn't lead to any new bug reports, just to
people not installing development snapshots since they case X server
crashes. So just turn them off.
While we are at it, limit the number of messages to stderr to 5
instead of 50.
|
|
No indenting of the header to keep git blame working
|
|
There is a couple of bugs in bugzilla where bugs in the X server
triggered asserts in the pixman region code. It is probably better to
let the X server survive this. (In fact, I thought I had disabled them
for 0.16.0, but apparently not).
The patch below uses these rules:
- In _stable_ pixman releases, assertions and selfchecks are turned
off. Assertions, so that the X server doesn't die. Selfchecks,
for performance reasons.
- In _unstable_ pixman releases, both assertions and selfcheck are
turned on. These releases are what get added to development
distributions such as rawhide, so we want as much self-checking
as possible.
- In _random git checkouts_, assertions are enabled, so that bugs
are caught, but selfchecks are disabled so that you can use them
for performance work without having to fiddle with turning
selfchecks off.
|
|
This cuts down the number of property_changed calls significantly.
|
|
|
|
|
|
|
|
|
|
Instead print a message to stderr so that it will end up in the X log
file.
|
|
- Introduce a GOOD_RECT() macro that checks that a pixman_box_t is not
empty or degenerate an use it.
- Use GOOD_RECT() instead of magic if statements for funtions that take
x, y, width, height arguments
- Use GOOD_RECT() in _reset(). The checks in the previous code seemed to
allow an empty box, but then created a broken region from it.
- Add GOOD(region) check at the end of _translate()
|
|
Create an empty region instead
|
|
Create an empty region in that case.
|
|
|
|
initialized.
Also add a couple more tests to region-test.c.
|
|
|
|
|
|
The name numRects is public API and can't be changed.
|
|
s/sizeRI/size_ri/g;
s/numRI/num_ri/g;
s/RepeatNone/REPEAT_NONE/g;
s/fbOver/over/g;
s/fbIn/in/g;
s/iSrc/src_image/g;
s/iMask/mask_image/g;
s/iDst/dest_image/g;
s/SaDa/Sa.Da/g;
s/FbMaskBits/MASK_BITS/g;
s/RenderSamplesX/RENDER_SAMPLES_X/g;
s/MMXData/mmx_data_t/g;
s/RegionInfo/region_info_t/g;
s/([^0x])([a-z])([A-Z])/$1$2_\l$3/g;
s/([^0x])([A-Z])([A-Z])([a-z])/$1$2_\l$3$4/g;
s/([^0x])([A-Z])([a-z]+)_([a-z])/$1\l$2$3_$4/g;
s/([a-z])_([A-Z])/$1_\l$2/g;
s/su_sE/SuSE/g;
s/X_Free86/XFree86/g;
s/X_free86/XFree86/g;
s/_ULL/ULL/g;
s/_uLL/ULL/g;
s/U_nc/UNc/g;
s/combine ##/combine_ ##/g;
s/## U/## _u/g;
s/## C/## _c/g;
s/UNc_aDD/UNc_ADD/g;
s/BLEND_MODE \((.+)\)/BLEND_MODE (\l$1)/g;
s/blend_(.+)/blend_\l$1/g;
s/AN_ds/ANDs/g;
s/O_rs/ORs/g;
s/over565/over_565/g;
s/8pix/8_pix/g;
s/Over565/over_565/g;
s/inU/in_u/g;
s/inPart/in_part/g;
s/inC/in_c/g;
s/inreverse/in_reverse/g;
s/get_exception_code/GetExceptionCode/g; # GetExceptionCode is WinCE API
s/CP_us/CPUs/g;
s/authentic_aMD/AuthenticAMD/g;
s/op_sR_cx_mAS_kx_dST/op_src_mask_dest/g;
s/no_VERBOSE/noVERBOSE/g;
s/mc_cormack/McCormack/g;
s/r1band/r1_band/g;
s/r2band/r2_band/g;
s/as GOOD things/as good things/g;
s/brokendata/broken_data/g;
s/X_render/XRender/g;
s/__open_bSD__/__OpenBSD__/g;
s/^Quick/quick/g;
s/NextRect/next_rect/g;
s/RectIn/rect_in/g;
s/pboxout/pbox_out/g;
s/F_sorted/FSorted/g;
s/usse2/u_sse2/g;
s/csse2/c_sse2/g;
s/cPixelsse2/c_pixel_sse2/g;
s/Mask565/mask_565/g;
s/565fix_rB/565_fix_rb/g;
s/565fix_g/565_fix_g/g;
s/565r/565_r/g;
s/565g/565_g/g;
s/565b/565_b/g;
s/uPixelsse2/u_pixel_sse2/g;
s/Mask00ff/mask_00ff/g;
s/Mask0080/mask_0080/g;
s/Mask0101/mask_0101/g;
s/Maskffff/mask_ffff/g;
s/Maskff000000/mask_ff000000/g;
s/load128Aligned/load_128_aligned/g;
s/load128Unaligned/load_128_unaligned/g;
s/save128Aligned/save_128_aligned/g;
s/save128Unaligned/save_128_unaligned/g;
s/fillsse2/fill_sse2/g;
s/unpack565/unpack_565/g;
s/pack565/pack_565/g;
s/bltsse2/blt_sse2/g;
s/x565Unpack/x565_unpack/g;
s/r1End/r1_end/g;
s/r2End/r2_end/g;
s/argb8Pixels/argb8_pixels/g;
|
|
|
|
|
|
s/([^a-z])pReg/$1region/g;
s/([^a-z])pY/$1y_line/g;
s/([^a-z])pU/$1u_line/g;
s/([^a-z])pV/$1v_line/g;
s/([^a-z])p([A-Z])/$1\l$2/g;
|
|
s/([^o])pSrc/$1src_image/g;
s/([^o])pDst/$1dst_image/g;
s/([^o])pMask/$1mask_image/g;
s/pRegion/region/g;
s/pNextRect/next_rect/g;
|
|
Otherwise they show up in the validated regions.
|
|
Delete some duplicated macros.
|
|
Instead just define the function in pixman-region16.c
|
|
Propagate the error returns from pixman_rect_alloc().
|
|
The region validate() code is frequently called by cairo as it is used to
extract regions from the trapezoids for fast-paths through the drawing
code and also for fast-path clipping and the RegionInfo allocation (as
well as the pixman_rect_alloc during the final union) appears as a hot
spot on application memory profiles.
|
|
There was significant performance overhead associated with indirect
call to the fetch functions, so inline them.
Also, the old code assumed that if the number of rectangles in the
source clip was 1, then the clip was identical to the image
boundaries. Fix that by running a full region_contains_point()
whenever the source clip is different from pict->common.full_region.
Based on a patch from Antoine Azar.
|
|
- Delete pixman_region_append()
- Delete pixman_region_empty()
- Make pixman_region_validate() static and don't export it.
Reported by Julien Cristau.
|
|
|
|
This used to be exported, so removing the export broke ABI.
|
|
|
|
|
|
|