Commit graph

8174 commits

Author SHA1 Message Date
Benjamin Otte
06e9caf861 image: pixman_image_fill_rectangles() => pixman_image_fill_boxes() 2010-04-28 20:14:55 +02:00
Benjamin Otte
bc49df3227 pixman_image_composite => pixman_image_composite32
Fix up the remaining callers
2010-04-28 20:14:55 +02:00
Benjamin Otte
393da364a7 fallback: Sanitize code that queries surface extents
The previous code was setting extents.is_bounded, but that value has a
completely different meaning.
2010-04-28 18:18:15 +02:00
Benjamin Otte
1391403956 test: run xlib-expose-event test unconditionally 2010-04-28 13:15:09 +02:00
Benjamin Otte
2ce1afa322 test-suite: add image_diff_is_failure() function
This cleans the code and fixes a boolean logic error where this check
was done manually.
2010-04-28 13:15:09 +02:00
Benjamin Otte
2a91d42508 fallback: Fix clip_region handling in mask creation
Fixes the xlib-expose-event test.
2010-04-28 13:15:09 +02:00
Chris Wilson
bb853916f3 image: Generate clear/white/black images when !HAS_ATOMIC_OPS
Andrea reported that b74cc0f broke compilation without atomic ops.
2010-04-28 11:37:59 +01:00
Chris Wilson
45d4c6e0b2 script: Replace the missing " " after pop
I accidentally deleted the whitespace after popping the recording
surface, thus causing the scripts to be broken.
2010-04-28 10:01:06 +01:00
Chris Wilson
6a99e83c50 subsurface: Mark the image as !clear after copying. 2010-04-28 09:55:20 +01:00
Chris Wilson
ca3df75e8f script: Reconstruct subsurfaces. 2010-04-28 09:54:56 +01:00
Chris Wilson
0f0d349a40 trace: Wrap cairo_surface_create_for_region() 2010-04-28 09:54:37 +01:00
Chris Wilson
80fc2a8e49 test: Expand xlib-expose-event to cover all backends
Use a similar surface to create an equivalent backing surface for
any backend, thus enabling the test to run against any target.

The comment about forcing fallbacks has long since been false.
2010-04-28 09:50:49 +01:00
Chris Wilson
d3c4349730 test: Mark surfaces as finished if the data goes out of scope.
The issue being that as the on-stack data is being referenced via a
zero-copy snapshot outside of the functions scope as the surface is only
finished and the source written long after the draw() returns. The
correct procedure is that the user must call cairo_surface_finish()
prior to any surface becoming inaccessible. In this case, this triggers
the snapshot to preserve a copy of the data whilst it is still valid.
2010-04-28 08:39:21 +01:00
Chris Wilson
a5f54e48e3 snapshot: The snapshot masquerades as the target surface type.
Not wholly convinced this is a good idea, but it matches the behaviour
of the other internal surface types.
2010-04-28 08:39:21 +01:00
Chris Wilson
4a678afdf7 snapshot: Simply memcpy if the cloned image matches the original. 2010-04-28 08:39:21 +01:00
Chris Wilson
b74cc0f6d5 image: Convert 1x1 samples into solid colors.
If the sampled extents of the operation on an image surface is just a
single pixel, we can safely convert to a solid color.
2010-04-28 08:39:21 +01:00
Chris Wilson
f5cf131a9d surface: skip OVER is the source is clear.
If the source has no alpha, the OVER operation becomes DST, i.e. a
no-op.
2010-04-27 18:56:23 +01:00
Chris Wilson
453b1cba11 test: Update image ref images, and used fonts in README 2010-04-27 16:47:31 +01:00
Chris Wilson
70656bba81 test: Add image16 refs 2010-04-27 14:19:22 +01:00
Andrea Canciani
ebe6f2ac69 quartz: Assert success of path creation
Path creation can only fail because of the callbacks, but in quartz
they all return CAIRO_STATUS_SUCCESS. Therefore we can just assert
that path creation was successful and simplify calling functions
(as they don't have to handle potential errors anymore).
2010-04-27 12:24:43 +02:00
Andrea Canciani
f67b600927 quartz: Simplify path creation
If paths are created before changing the ctm (when stroking) no
multiplication is needed in the path construction code.
2010-04-27 12:24:43 +02:00
Andrea Canciani
3b2ceff050 quartz: Stroke without ctm_inverse multiplication
If the CTM is not changed before creating the path, no multiplication
needs to be made between points and the inverse of the CTM.
2010-04-27 12:24:42 +02:00
Chris Wilson
514d366cde snapshot: propagate status on finish 2010-04-27 11:09:25 +01:00
Chris Wilson
a505104013 image: Compute sample extents
In order to reuse the original image as the pixman pattern, then the
entire operation must be wholly contained within the extents of the
image (including subsurfaces) and be reducible to an untransformed
REPEAT_NONE.
2010-04-27 11:07:45 +01:00
Andrea Canciani
b8a7f8621a Update FSF address
I updated the Free Software Foundation address using the following script.

for i in $(git grep Temple | cut -d: -f1 )
do
  sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
2010-04-27 11:13:38 +02:00
Benjamin Otte
9672aab6b7 tests: Integrate xlib-expose-event test into usual tests
Previously the test was using the preamble vfunc and generating output
itself. Now it uses the draw function and ignores any but the xlib
backends.
2010-04-26 21:42:47 +02:00
Chris Wilson
36e0a3d3a0 trace: Remove unused functions
trace.c:1154: warning: ‘_has_font_face_id’ defined but not used
trace.c:1196: warning: ‘_get_pattern_id’ defined but not used
trace.c:1870: warning: ‘_emit_font_face’ defined but not used
trace.c:1882: warning: ‘_emit_scaled_font’ defined but not used
2010-04-26 18:18:49 +01:00
Chris Wilson
3a2d9ffe03 trace: Check return value to suppress compiler warning
trace.c: In function ‘get_prog_name’:
trace.c:741: warning: ignoring return value of ‘fgets’, declared with
attribute warn_unused_result
2010-04-26 18:18:49 +01:00
Chris Wilson
37be183412 trace: Trivial compiler warning fix
trace.c:1665: warning: initialization from incompatible pointer type
2010-04-26 18:18:49 +01:00
Chris Wilson
3c9e5d9792 region: Cast to remove const to suppress compiler warnings.
airo-region.c: In function ‘cairo_region_intersect’:
cairo-region.c:503: warning: passing argument 3 of
‘pixman_region32_intersect’ discards qualifiers from pointer target type
/usr/local/include/pixman-1/pixman.h:518: note: expected ‘struct
pixman_region32_t *’ but argument is of type ‘const struct pixman_region32_t *’

cairo-region.c: In function ‘cairo_region_union’:
cairo-region.c:566: warning: passing argument 3 of
‘pixman_region32_union’ discards qualifiers from pointer target type
/usr/local/include/pixman-1/pixman.h:521: note: expected ‘struct
pixman_region32_t *’ but argument is of type ‘const struct pixman_region32_t *’
2010-04-26 18:18:48 +01:00
Chris Wilson
8c72122df5 clip: Skip combining with solid pixel aligned boxes. 2010-04-25 10:30:12 +01:00
Chris Wilson
240ebaf81a clip: Fix sign reverse when combining with the clip surface.
Finally, found the reversed sign in the clipping code, thanks cu!

Fixes: test/clip-shape
2010-04-25 09:45:41 +01:00
Chris Wilson
4d3632761b clip: Report the surface offset when retrieving the clip mask
Stop the callers from guessing the origin of the clip surface by
reporting it explicitly! This enables the clip to bypass any rectangles
overlaid on top of the clip surface, which is common when the backends
limit the clip to the extents of the operation -- but irrelevant to the
actual content of the clip mask
2010-04-25 09:45:41 +01:00
Chris Wilson
241ce933f8 test: Add clip-shape
cu found a bug when using clipping and fills with the image backend, but
it turns out to be the lost sign bug afflicting everything...

To trigger the bug requires evaluating the clip surface prior to using
in with _cairo_clip_combine_with_surface(). Which is taken along a
particular path when using a clip mask with non-pixel geometry on image,
but more easily hit by the fallback code.

Reported-by: <cairouser@yahoo.com>
2010-04-25 09:45:41 +01:00
Benjamin Otte
1687c7b7d3 xlib: Fix display closing to work properly
Previously we free()'d the cairo_device's memory which was not good at
all. Now the code causes cairo_device_finish() instead.
2010-04-23 22:22:28 +02:00
Benjamin Otte
637564c562 xlib: Fix screen device handling
Add a _cairo_xlib_device_create() function that could easily be exported
as a replacement for _cairo_xlib_display_get(). This function returns a
cairo_device_t instead of a cairo_xlib_display_t because the display
isn't acquired.
2010-04-23 22:18:54 +02:00
Benjamin Otte
49b52a8946 gl: Make drawing to windows work again
The correct MIN/MAG_FILTER wasn't set.
2010-04-23 21:46:22 +02:00
Benjamin Otte
3efbc0c5c8 gl: Only unref a surface if it exists
Note: This will likely work for NULL clones, but I prefer not
dereferencing NULLs. That gives people a wrong understanding of the code
(i.e. me).
2010-04-23 21:46:12 +02:00
Benjamin Otte
64662be4ef gl: Use GLfloat instead of float in gl*Array() functions 2010-04-23 21:46:04 +02:00
Benjamin Otte
e4f84f97b2 gl: Don't acquire the gl context twice 2010-04-23 21:45:56 +02:00
Benjamin Otte
e40a2d1f5e gl: Use correct type when uploading images 2010-04-23 21:45:01 +02:00
Benjamin Otte
55cf323f96 gl: fix typo in comment 2010-04-23 21:44:20 +02:00
Chris Wilson
887d43578c xlib: Simply release the ref, not destroy, from CloseDisplay.
Do not call the destroy function directly, but rely on the reference
counting to call the notifier upon the last reference. Instead, simply
release the reference we were holding for the cache and CloseDisplay
callback.
2010-04-23 20:15:44 +01:00
Chris Wilson
c63e3490a5 cairo: Handle the all-clipped state in cairo_push_group()
Yet another bug reported by Jeff Muizelaar, thanks!

Fixes: test/clip-empty-group
2010-04-23 14:47:59 +01:00
Chris Wilson
567e485f28 test: Add clip-empty-group
Exercise a bug reported by Jeff Muizelaar whereby cairo_push_group() was
broken by everything being clipped out.
2010-04-23 14:47:51 +01:00
Chris Wilson
4438cc6a49 cairo: Use explicit device flushing.
Now with the concept of a cairo_device_t and the ability to flush it,
we now longer require the heuristic of automatically flushing on behalf
of the user at the end of every context.
2010-04-23 14:39:21 +01:00
Chris Wilson
0fc140abc3 pdf: Suppress compiler warning. 2010-04-23 14:39:21 +01:00
Chris Wilson
1923a33a72 cairoint.h: Change ASSERT_NOT_REACHED to remove compiler warning 2010-04-23 14:39:21 +01:00
Chris Wilson
d366da7d8c Win32 features update 2010-04-23 14:39:21 +01:00
Chris Wilson
c1e51a0264 build: Spelling correction 2010-04-23 14:39:21 +01:00