summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-06-07gl: Fix span renderer doing bad stuff for CLEAR and SOURCEglBenjamin Otte1-0/+7
SOURCE will fallback now, CLEAR is identical to DEST_OUT with white.
2010-06-07gl: Fix span renderer for unbounded spansBenjamin Otte1-23/+49
The span renderer used to not output rects for the top and bottom rows when they didn't contain any spans.
2010-06-07gl: Add a simple spans renderer for stroke/fillBenjamin Otte1-3/+175
It's very simple as clipped polygons or ANTIALIAS_NONE still return UNSUPPORTED. Also, no optimizations are done, so even pixel-aligned rectangles use the full span rendering. Still, there are no performance regressions in the benchmark traces and firefox-talos-svg and swfdec-giant-steps both got ~15% faster.
2010-06-07Remove _cairo_surface_composite_trapezoids_as_polygon()Benjamin Otte4-113/+0
The function computed the composite rectangles wrong and was only used in a gl fallback anyway. So instead of trying to fix it, just remove it and make sure gl doesn't fallback.
2010-06-07gl: Fix vertex size changes not causing updates of the operandsBenjamin Otte1-7/+10
Check vertex size stays identical when setting up vertices.
2010-06-07gl: Add a gradient texture cacheBenjamin Otte4-9/+81
For firefox-planet-gnome, 19135 times a gradient gets rendered using only 10 different gradients. So we get a 100% hit rate in the cache. Unfortunately, texture upload is not the biggest problem of this test, as the performance increase is only moderate - at least on i965: 34.3s => 33.5s
2010-06-07device: flush before setting finishedBenjamin Otte1-2/+2
Otherwise APIs critical for flushing - in particular acquiring the device - do not work.
2010-06-07gl: Make gradient textures a separate objectBenjamin Otte5-145/+327
This is necessary so we can do proper refcounting and don't delete the gradient texture prematurely.
2010-06-07gl: Use the generic functions for filter/extend in gradientsBenjamin Otte2-18/+10
2010-06-07gl: Create separate functions for setting extend and filterBenjamin Otte1-19/+28
2010-06-07gl: Switch to deferred renderingBenjamin Otte4-32/+28
1) call _cairo_gl_composite_flush() or cairo_surface_flush() where needed 2) Destroy texture operands when necessary 3) get rid of _cairo_gl_composite_end() With this patch, vertices are not flushed immediately anymore, but only when needed or when a new set of vertices is emitted that requires an incompatible setup. This improves performance a lot in particular for text. (gnome-terminal-vim gets 10x faster)
2010-06-07gl: Make using shaders an explicit argumentBenjamin Otte1-7/+8
This is preparation for a followup patch
2010-06-07gl: Special case blend mode for CAIRO_CONTENT_COLORBenjamin Otte1-0/+2
This ensures that alpha stays at 1 for RGB in all cases.
2010-06-07gl: rework _cairo_gl_set_operator()Benjamin Otte3-7/+13
1) store the current operator. This will be useful later to check if the operator changed. 2) pass the context instead of the destination as first argument. The destination is known to be the current target.
2010-06-07gl: Only resetup textures if we need toBenjamin Otte1-0/+45
2010-06-07gl: Do not reset the current target on releaseBenjamin Otte1-1/+1
This now also requires a call to cairo_device_flush().
2010-06-07glx: When acquiring device, use the correct drawableBenjamin Otte1-3/+13
2010-06-07gl: Store the vertex offset in the operandBenjamin Otte2-0/+2
2010-06-07gl: Introduce a temporary texture unitBenjamin Otte4-1/+28
...and use it for image uploads. This makes sure that the texture units used for SOURCE and MASK get not clobbered when images get uploaded to textures.
2010-06-07gl: Only allocate a framebuffer if we need oneBenjamin Otte3-19/+29
This way, we don't clobber the current target when creating textures for image surfaces.
2010-06-07Call cairo_surface_flush() before setting finishedBenjamin Otte1-1/+1
With the current code, the surface will never be flushed as the flush function checks if the surface is finished, and if so, doesn't call the vfunc. Ooops.
2010-06-07gl: Flush properly in set_destinationBenjamin Otte1-16/+17
2010-06-07gl: Don't reset vertex sizeBenjamin Otte2-4/+7
2010-06-07gl: Remove check if we're between begin/endBenjamin Otte2-8/+0
This will be useless soon, because we will keep the current state alive as long as possible.
2010-06-07gl: Stop disabling the vertex array and the array bufferBenjamin Otte2-8/+8
2010-06-07gl: Do not reset shaders on _end()Benjamin Otte3-13/+31
Instead, keep the shader around until cairo_device_flush() is called.
2010-06-07region: clarify docs of cairo_region_equal()Benjamin Otte1-4/+5
2010-06-07gl: Make _shader_by_type() a getterBenjamin Otte3-12/+22
And refactor code to do the current_shader assigning itself.
2010-06-07gl: bind all shader variables at the same placeBenjamin Otte2-17/+20
Avoids the need to bind the shader when creating it.
2010-06-07gl: Set GL_BLEND and GL_SCISSOR_TEST globallyBenjamin Otte3-8/+12
Note that we do set them unconditionally in _begin() because a flush might have cleared them.
2010-06-07gl: Introduce flush functionsBenjamin Otte4-8/+60
The flush functions will clear the state that will in the future be kep unconditionally.
2010-06-07docs: fix typoBenjamin Otte1-1/+1
2010-06-07device: Make flush vfunc return a cairo_status_tBenjamin Otte3-4/+11
Mirror the behavior of the surface flush vfunc: Make it return a status and if it's an error set it on the device.
2010-06-07gl: Move unsetting the state into the operand destroy functionBenjamin Otte1-14/+29
2010-06-07gl: get rid of the operand's pattern variableBenjamin Otte2-13/+10
Now someone just needs to teach cairo-gl to not use cairo_pattern_acquire_surface() and we could avoid the nasty hack in cairo_gl_operand_destroy().
2010-06-07gl: Check mask's attributes for component alphaBenjamin Otte2-7/+8
... and don't duplicate that information into the cairo_gl_composite_t
2010-06-07gl: Merge fixed function setup into general texture setupBenjamin Otte1-50/+34
2010-06-07gl: Move functionBenjamin Otte1-29/+29
I wanna use it elsewhere and keep the diff small.
2010-06-07gl: Simplify mask operand setup codeBenjamin Otte1-33/+7
Component alpha just has one different value
2010-06-07gl: Get rid of operand argument to emit functionsBenjamin Otte4-30/+19
2010-06-07gl: Add an enum for tex unitsBenjamin Otte3-32/+27
Instead of hardcoding 0 for source and 1 for mask, use an enum. It's also clearer when functions take a cairo_gl_tex_t argument instead of a GLuint.
2010-06-07gl: Keep a copy of the current operand in the contextBenjamin Otte2-4/+18
Note that they are currently only valid as long as the cairo_gl_composite_t exists, but that will be changed soon.
2010-06-07gl: Move struct definitions in headerBenjamin Otte1-33/+33
2010-06-07gl: operand->texture.surface cannot be NULLBenjamin Otte1-7/+3
2010-06-07gl: Remove composite_t argument from _flush() functionBenjamin Otte3-13/+9
2010-06-07gl: Remove dependency on composite_t in draw functionBenjamin Otte1-2/+2
2010-06-07gl: Remove unneeded and broken workaroundBenjamin Otte1-13/+1
We now ensure the values are properly zeroed when setting the operator.
2010-06-07gl: Switch src alpha handling to a tiny on/off functionBenjamin Otte1-15/+7
Instead of doing setup every time, we just set this one flag. Much nicer.
2010-06-07gl: Avoid redundant mask setupBenjamin Otte1-2/+0
The mask doesn't change, so no need to set it up twice
2010-06-07gl: Split fixed-function operand setup into own functionBenjamin Otte1-109/+42