summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-01-15gl/msaa: Check for more extensions before using MSAAMartin Robinson1-16/+17
The MSAA compositor is implicitly relying on the existence of several OpenGL extensions. This change makes those dependencies explicit.
2013-01-14script: Set decompression length prior to calling decompressorsChris Wilson1-1/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59224 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13xlib: Initialise Pixmap for proxy sourcesChris Wilson1-1/+2
So that we do not try to tell X to free a garbage pixmap and promptly kill us. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13compositor: Pass back the internal failureChris Wilson1-2/+2
In order to pass back a CAIRO_INT_STATUS_UNSUPPORTED, we need to use the internal error surface creation functions as they do not assert on private error codes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13compositor: Convert image surface into backend sourceChris Wilson1-15/+46
Before passing a surface to the backend composite functions, they expect them to be a native source. The copy'n'paste code for the mask compositor forgot to perform the conversion upon the clip surfaces, which originally were native to the backend and are now images. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13xlib: Handle lack of XRenderFillRectanglesChris Wilson4-37/+157
Remember to check for a supported render version before making a FillRectangle request, and fallback to the core protocol where possible instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-11xlib: Only fallback through the mask intermediate if we can composite the maskChris Wilson3-16/+38
Before rendering into the mask, we should first check whether the subsequent call to composite the mask will trigger a fallback. In that case, we should fallback earlier and do the operation in place. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-09gl/msaa: Rely on the stencil buffer to cache the clipMartin Robinson3-17/+46
When using a texture surface the depth/stencil buffer is private to cairo so we can rely on the fact that any previously painted clip is still valid. We also only scissor when there's a previously painted clip on the stencil buffer, otherwise we disable the scissor test. This fixes a few test cases.
2013-01-09gl/msaa: No need to set the clip when maskingMartin Robinson1-1/+0
After 5e9083f882859201c5df18fc870577a224f88cbb there's no need to set a clip on the cairo_gl_composite_t when masking. Clips are converted to traps and rendered directly when masking now.
2013-01-09xcb: _cairo_scaled_font_reset_cache does it own lockingChris Wilson1-2/+0
So we can drop ours. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-09xlib: map-to-image requires an extentsChris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-09stroke: Flip the dev slope as well for computing the cusp on a degeneracyChris Wilson1-0/+2
Otherwise, the join think it starts and end in exactly the same direction and elimiates the round capping. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-09gstate: Use the polygon intermediate for geometry queriesChris Wilson1-12/+12
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-09scaled-font: Fix use after free when clearing the glyph cacheChris Wilson1-2/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-09scaled-font: Make reset-font-cache threadsafeChris Wilson1-35/+31
Stop trying to workaround the destroy-callback requiring the font mutex as we already hold the mutex whilst cleaning up the font caches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08gl: Do less work when acquiring and releasing devicesMartin Robinson4-24/+301
After acquiring a GL device and the same GL context, surface, and display combination is already active outside of Cairo, do not ask EGL or GLX to change the current context as that may cause a flush on some drivers. Also do not unset the context when releasing the device for the same reason.
2013-01-08image: Allocate a temporary buffer for inline span compositionChris Wilson1-4/+20
Allow the inpline span compositor to operate on wider images than its temporary buffer by allocating a scanline mask. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08scaled-font: Remove a non-threadsafe double-freeze assertChris Wilson1-1/+0
Sadly we cannot check ahead of acquiring the lock whether we hold the lock. Just have to rely on lockdep. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08xlib/shm: Only destroy an existing damageChris Wilson1-2/+4
_cairo_damage_destroy() does not like to be passed a NULL. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08xlib/shm: Discard damage upon shm finishChris Wilson3-0/+13
Both to make sure we do not leak the memory, but to also prevent _cairo_xlib_surface_put_shm() from operating upon the finished shm surface after the display is closed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58253 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08scaled-font: Hold the scaled font mutex whilst reaping from the global cacheChris Wilson1-2/+7
If we need to reap the global cache, this will call back into the scaled font to free the glyph page. We therefore need to be careful not to run concurrently with a user adding to the glyph page, ergo we need locking. To complicate matters we need to be wary of a lock-inversion as we hold the scaled_font lock whilst thawing the global cache. We prevent the deadlock by careful ordering of the thaw-unlock and by inspecting the current frozen state of the scaled-font before releasing the glyph page. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08scaled-font: Assert if attempting to finish a frozen fontChris Wilson1-0/+12
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08scaled-font: Free the cached glyphs from the font before taking the global lockChris Wilson1-1/+20
In the case of a recording surface we may recurse into the global glyph cache so we need to be careful and stage the ordering of how we free the glyphs. So first we finish any information and surfaces from the scaled font glyph cache (and so triggering recursion into other scaled fonts) and then take the global cache and remove our pages. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54950 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08scaled-font: Always hold the mutex even for single glyph probesChris Wilson1-20/+21
The freeze/thaw routines have a side-effect of managing the global glyph cache in addition to taking the mutex on the font. If we don't call them, we may end up indefinitely keeping the global glyph cache frozen (effectively leaking glyphs to the maximum of all open fonts) and triggering asserts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08script: Thaw the scaled font cache on the error pathChris Wilson1-1/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08script: Simply exchange source/dest images for _set_source_imageChris Wilson1-5/+14
But note we can only do the exchange if they do indeed match and there are no other references (the objects are only on the stack). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08script: Attempt to decompress images in placeChris Wilson3-167/+247
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-07image: Call pixman without a mask for opaque regions of inplace_spansChris Wilson1-10/+47
Speedups ======== firefox-paintball 59462.09 -> 40928.76: 1.45x speedup firefox-fishtank 43687.33 -> 34627.78: 1.26x speedup firefox-tron 52526.00 -> 45754.73: 1.15x speedup However in order to avoid a regression with firefox-talos-svg we need to prevent splitting up the scanline when using a gradient source. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-06xlib: Simplify source creation by use of map-to-imageChris Wilson1-59/+33
We were open-coding the functionality of map-to-image inside the source creation routines. so refactor to actually use map-to-image instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-06xlib/shm: Only mark the shm pixmap as active if we upload into itChris Wilson1-9/+14
Be more strict with when we mark the pixmap as active so that we only wait for the actual XCopyArea involving the pixmap to complete. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-05script: Recompress strings using LZO whilst binding tracesChris Wilson7-56/+227
Try using the lighter-weight LZO decompressor in an effort to speed up replays (at the cost of making the bound traces slightly larger). Presuming that with the slight increase in file size (from -1% to +10%), the file data remains in the readahead buffer cache, replays see a performance improvement of between 5-10%. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-04gl: Better handling of clear surfacesMartin Robinson1-6/+37
When clearing a GL surface, set is_clear to true, and when mapping to an image, handle is_clear like surfaces without modification. Additionally, explicitly clear surfaces created via cairo_surface_create_similar.
2013-01-04boilerplate/glx: Add a target with multisampling and stencil supportMartin Robinson1-74/+96
Add a gl-window target that supports multisampling. This is useful for testing the MSAA backend on the default framebuffer.
2013-01-04gobject: Fix my typo s/TEST/TEXT/ in the previous commitChris Wilson1-1/+1
Again reported by Kouhei Sutou, who I am grateful for his deligence.
2013-01-04gobject: Fix "text_cluster_flags_get_type" typoKouhei Sutou1-1/+1
The macro missed the text from the name, rendering it useless.
2013-01-03gl/msaa: Only clear parts of the stencil buffer we will useHenry Song3-11/+44
Writing to the stencil buffer can be expensive, so when using the stencil buffer for clipping only clear the clip extent. When using the stencil buffer to prevent overlapping rendering during stroking, only clear the approximate stroke extents.
2013-01-03gl/msaa: Avoid the stencil buffer when possible during maskingAlejandro G. Castro1-15/+53
In this case we can draw the clip path and avoid the stencil buffer, which can be expensive.
2013-01-03gl/msaa: Add full support for masking with the SOURCE operatorHenry Song3-49/+152
Since OpenGL does not have a means to represent a masking SOURCE operation in one step, we use two steps combined with the ADD operator.
2013-01-03gl: Support the GL_IMG_texture_npot extensionChuanbo Weng1-1/+2
This extension, used by older PowerVR drivers, is functionally equivalent to the GL_OES_TEXTURE_NPOT extension.
2013-01-03Add missing local slim proto for cairo_recording_surface_createChris Wilson1-0/+1
Dependency introduced in 749ef6be4d11b95d666b0e5fe06df926b828d655 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-03scaled-font: Mention ownership of returned object from get_font_face()Chris Wilson1-1/+2
As suggested by Simon Sapin. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-03xlib: Avoid copying the source twice if it is an imageChris Wilson1-10/+27
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-03gobject: Add the correct macro name for the hint-metrics typeKouhei Sutou1-0/+2
s/CAIRO_GOBJECT_TYPE_HNT_METRICS/CAIRO_GOBJECT_TYPE_HINT_METRICS/ However, as we have already released the broken headers, we need to preserve that mistake in case applications are already using. Since it is just a #define, there is little associated cost with carrying both the incorrect spelling and the corrected define.
2013-01-03stroke: Make the incremental trapezoid stroker optionally available againChris Wilson12-30/+1489
Whilst it cannot handle self-intersecting strokes (which includes the antialias region of neighbouring lines and joints), it is about 3x faster to use than the more robust algorithm. As some backends delegate the rendering, the quality may still be preserved and so they should be responsible for choosing the appropriate method for generation of the stroke geometry. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-03xlib: Use SHM transport for ordinary image uploadsChris Wilson1-23/+77
In theory this should just save a single copy, however PutImage will break up requests into a series of scanlines requests which is less efficient than the single-shot transfer provided by ShmPutImage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-03xlib/shm: Fix typo in creation of a SHM imageChris Wilson1-5/+3
Pass along the size the caller requests, not the size of the related drawable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-30gl: Provide a fast emitter for solid spansChris Wilson1-5/+50
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-30gl: Provide a fast emitter for solid glyphsChris Wilson1-13/+49
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-30gl: Use vfunc for vertex emissionChris Wilson6-114/+190
In order to overload the emitters in future to provide specialised routines for the common types of operands, begin by switching the current users over to a vfunc interface. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29perf/chart: Contract the default output filenamesChris Wilson1-3/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>