summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-08win32: Clear the similar-image before returning to the userChris Wilson1-1/+9
Our userspace API mandates that surfaces created for the user are cleared before they are returned. Make it so for the win32 similar image constructor. Reported-by: Michael Henning <drawoc@darkrefraction.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60519 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08xlib: Only apply the dst offset to the glyph strings onceChris Wilson1-6/+6
The elts offset is a delta from the previous glyph coordinate. So by subtracting the dst origin everytime, we were accumulating a glyph position error. Instead we just want to offset the starting coordinate and then always use relative positions. Reported-by: Theo Veenker <T.J.G.Veenker@uu.nl> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08polygon: Avoid computing the unused intersection coordinatesChris Wilson1-5/+8
If we only ignore the result of the computed boundary intersection, because the edge is inside that boundary, then we can simply forgo the calculation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08polygon: Only rely on the computed boundary intersections for crossing edgesChris Wilson1-10/+25
If we need to extrapolate the edge to the boundary, then we run the risk of an overflow for an immaterial result. So if the edge does not cross the boundary, we can simply use the corresponding end-point and not emit the boundary segment. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60489 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07gl: Mark up _cairo_gl_composite_set_operator* as privateChris Wilson1-2/+2
Add the cairo_private markup to hide the PLT entries and to keep make check happy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07gl/spans: Handle SOURCE operations with opaque sources.Ravi Nanjundappa1-0/+7
SOURCE operations with an opaque are equivalent to OVER. This can prevent us from falling back in certain cases. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07win32: Fix is_win98()Chris Wilson1-3/+3
Since the translation into a separate function, its condition was reversed: that is almost everybody thought they were on a win98 machine and so had no working AlphaBlend(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07image: Substitute OVER spans for SOURCE with an opaque patternChris Wilson1-2/+10
Based on an idea from Ravi Nanjundappa Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06gl/msaa: Properly fall back when using CLEAR operatorMartin Robinson1-0/+7
There are some situations that the MSAA compositor doesn't support using the CLEAR operator. We should properly fall back in those cases.
2013-02-05type1-subset: in latin subsets replace glyph names with standard namesAdrian Johnson1-2/+17
When using WinAnsiEncoding in PDF the glyphs are keyed by glyph name. We need to ensure the correct names are used and can't assume the glyph names in the font are correct. Bug 60248
2013-02-04gl: do not force flush everytime uploading a glyph image to glyph cacheHenry Song6-15/+24
In normal cases, we want to flush pending operations reading from the texture before modifying its contents. However during uploading of glyphs into the glyph cache, we repeatedly modify the texture as we construct the vbo (whilst referencing it for that operation). We track unused areas in the glyph cache so that if we run out of space, we can explicitly flush the pending glyphs and start afresh and avoid having to flush the operation in common case.
2013-02-04gl: Include the vertex ident in the shader cache hashChris Wilson1-19/+30
As we may specialise the vertex program depending upon details of the fragment shader, and may have more than one program for the same combination of fragment sources, we need to include the vertex tag in the cache entry. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-04gl: Replace manual vertex transformation with VS computation of texcoordsChris Wilson8-63/+162
Not only is our point transformation code is quite slow (well at least compared to a real GPU), but by deriving the texture coordinates from the vertex position we can elide the multiple arrays that we need to construct and pass to GL - improving performance by eliminating CPU overhead from needless transforms and data shovelling. However, not all vertex emission is suitable. For instance, for glyphs we need to emit discontiguous texture coordinates for each glyph, but span generation is suitable - which fortuitously also has the largest vertex density and so benefits the most. The only real concern is for hardware without true vertex shader support (e.g. i915) but there we are already invoking the VS to transform the vertex into the viewport. We would need to eliminate that transform as well as manually compute the texture coordinates in order to eliminate the vertex recomputation pass. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-03qt: Update for fallback compositorChris Wilson1-70/+140
We now need to explicitly manage fallbacks and to provide an implementation for map-to-image/unmap-image.
2013-02-02surface: Prevent reads from the user-data arrays during teardownChris Wilson1-1/+7
In a similar fashion to the previous commit, we also need to be wary of users simply trying to read from a potentially freed user-data array. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-02surface: Prevent writes to the user-data arrays during teardownChris Wilson1-0/+9
As we cleanup the user-data arrays, we call the user provided destroy notifier callbacks. These callbacks are at liberty to write back into the parent surface, and in particular try to write into the arrays that we have just freed. This causes hard to control and fairly unpredictable use-after-frees in the client, so lets just rule out the dangerous behaviour. References:https://bugzilla.mozilla.org/show_bug.cgi?id=722975 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-01image: Add a convenience function for creating an image from another's dataChris Wilson2-0/+62
The GL backend would like to extract a rectangle from another surface and convert it to a different pixel format. The _cairo_image_surface_create_from_image() does that by returning a new image that has the contents of the specified rectangle in the source Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31NEWS: fix a couple of typosChris Wilson1-2/+2
Reported-by: Thierry Vignaud
2013-01-31Post release version bump to 1.12.13Chris Wilson1-1/+1
2013-01-311.12.12 releaseChris Wilson2-1/+25
2013-01-31test: Refresh refs for aa noise following reduction of the 2-stage compositingChris Wilson34-0/+0
A side effect of commit c986a7310bb06582b7d8a566d5f007ba4e5e75bf Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Jan 24 08:55:54 2013 +0000 image: Enable inplace compositing with opacities for general routines is that we should in theory be reducing the rounding errors when compositing coverage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31image: Add a reference for the clone's parent imageChris Wilson1-1/+8
We use the parent as a flag during map-to-image/umap-image that the resultant image came from a fallback rather than as direct call to the backend's map_to_image(). Whilst we use it as a simple flag, we need to make sure the parent surface obeys the reference counting semantics and is consistent for all callers. Unlike other users of the parent pointer, there is no resource sharing between the two surfaces. Reported-by: Henry Song <henry.song@samsung.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31perf: Synchronize before stopping the timersChris Wilson1-0/+3
Fixes a regression from commit 2855ff4666922f2c38505414270d47f659b0d499 Author: Andrea Canciani <ranma42@gmail.com> Date: Wed Aug 31 16:42:03 2011 +0200 perf: Reuse cairo-time which dropped the essential call to synchronize when refactoring the code. Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: More clarification of seqno requiredChris Wilson1-3/+3
Everytime I read the predicate wrong, but hopefully, this time I have it right! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: Clarify testing of seqnoChris Wilson2-5/+17
Rename the seqno tests into seqno_passed(), seqno_before() and seqno_after() in order to clarify their semantics. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29gl/msaa: Don't emit alpha when emitting verticesHenry Song1-13/+11
The color attribute is disabled when not in spans mode, so the emitted alpha is simply overwritten by the next vertex. Additionally, this can potentially cause the alpha to be written past the end of the buffer.
2013-01-29configure: Include X11.h before testing for usability of Xrender.hChris Wilson1-1/+2
On Solaris at least, the Xrender.h header is not standalone and requires X11/X.h to be included first to define the essential types. Reported-by: Andreas F. Borchert <bugzilla@andreas-borchert.de> Bugzilla; https://bugs.freedesktop.org/show_bug.cgi?id=58199 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: Appease the compiler for a 'maybe used uninitialised' variableChris Wilson1-2/+1
Initialise shm during its declaration so that it is indeed initialised for the cleanup after every path. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: Simplify uploading of SHM image dataChris Wilson1-10/+12
Make sure that we simply copy from the SHM segment into the target drawable, and not inadvertently stage it through another SHM buffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: Force synchronisation for scratch SHM image buffersChris Wilson1-1/+1
The scratch image buffers are used for uploads to the xserver and so we must be careful not to overwrite active SHM segments. Unfortunately we told the core SHM allocator that we would sync before using the images, which was a lie. Reported-by: Michael Natterer <mitch@gimp.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: Always request a CompletionEvent from ShmPutImageChris Wilson2-10/+4
...and treat is as an expected event for synchronisation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: Tidy up destroying the mempool for a shm blockChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: Tidy creation of the proxy source for ShmPixmapsChris Wilson1-7/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: Skip creating new SHM segments if the data is already in the xserverChris Wilson1-0/+4
If the image is already inside a SHM segment, but the image format does not match the surface, fallback to the XRender paths in order to perform colorspace conversion on the data already inside the Xserver. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29xlib/shm: Tighten mark-active to the actual CopyArea on the ShmPixmapChris Wilson1-1/+2
Along the draw_image_boxes() upload path, we were actually marking the ShmPixmap as still active for the subsequent drawing operation - which could in theory never be submitted... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-28perf; Do not allow the backends to optimize away the clear before syncChris Wilson1-3/+7
The importance of writing to the scratch surface before retrieving an image is that it makes that the write lands in the server queue, as well as the GetImage, in order to serialise the timer against all the operations. Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27image: And more fallout from c986a73, restore the absent short runsChris Wilson1-18/+16
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27Mark _cairo_path_is_simple_quad as privateChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27image: Fix opaque span fillsChris Wilson1-2/+2
I should have realised the previous result was too good to be true! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-26image: Enable inplace compositing with opacities for general routinesChris Wilson2-30/+162
On a SNB i5-2500: Speedups ======== firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup ocitysmap 485.64 -> 431.94: 1.12x speedup Slowdowns ========= firefox-fishbowl 46878.98 -> 54407.14: 1.16x slowdown That slow down is due to overhead of the increased number of calls to pixman_image_composite32() (pixman_transform_point for analyzing the source extents in particular) outweighing any advantage gained by performing the rasterisation in a single pass and eliding gaps. The solution that has been floated in the past is for an interface into pixman to only perform the analysis once and then to return a kernel to use for all spans. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-25gl/msaa: Add a fast path for fills that are simple quadsMartin Robinson3-40/+158
Instead of invoking Bentley-Ottman for fills that are simple quadrilaterals, just pass the geometry straight to OpenGL.
2013-01-25gl: Use GL_ALPHA textures for CAIRO_CONTENT_ALPHA glyph cachingHenry Song3-15/+45
It's safe to us GL_ALPHA for glyph caching surfaces, since Cairo only uses them for texture uploading. This saves a little bit of memory.
2013-01-25gl: Fix typos in multisampling detectionHenry Song1-3/+3
Instead of looking for the EXT_framebuffer_multisample, this code should look for GL_EXT_framebuffer_multisample. GL_ARB_framebuffer_object also contains all necessary API for using multisampling, so we don't need to check for both it and the GL_EXT_framebuffer_blit and GL_EXT_framebuffer_multisample pair.
2013-01-25gl/msaa: Fix a memory leak in _clip_to_trapsHenry Song1-0/+2
We need to clean up the polygon we create when decomposing a path into trapezoids.
2013-01-23gl: Don't query the display when checking if the context changedHenry Song2-18/+8
If display has changed, the associated context must change. A context is tied a display so we can avoid this check, eliminating unnecessary work during context acquisition and release.
2013-01-23xlib: Do not upload the whole image just because we want an entire rowChris Wilson2-14/+18
Fixes regression exposed by commit a73e7ff0186176bc82cd3ae1432c054c1fd3aebd Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Jan 6 11:29:27 2013 +0000 xlib: Simplify source creation by use of map-to-image but ultimately from commit 74941f822015cc50cd8477d0cf97f1a70dbff60b Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Jan 2 22:27:55 2013 +0000 xlib: Use SHM transport for ordinary image uploads Reported-by: Gökçen Eraslan <gokcen.eraslan@gmail.com> Reported-by: Guillaume Ayoub <guillaume.ayoub@kozea.fr> Reported-by: Emmanuel Benisty <benisty.e@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59635 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16version: Post-release bump to 1.12.11Chris Wilson1-1/+1
2013-01-161.12.10 releaseChris Wilson2-1/+50
2013-01-15gl: Follow up fix for the previous commitMartin Robinson1-1/+1
Handle "fake" surfaces created by _cairo_gl_pattern_to_source which just embed a GL backend operand. These surfaces do not have a backend, so we should not fall back if a surface without a backend is not a texture surface.
2013-01-15gl: Support for non-texture sources and masksHenry Song1-0/+3
If a GL surface is not a texture and is used as source or mask, fall back to using an image surface as an intermediary. Fixes subsurface-image-repeat, subsurface-modify-child, subsurface-modify-parent, subsurface-outside-target, subsurface-pad, subsurface-reflect, subsurface-repeat, and subsurface-scale.