summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_filter.h (follow)
AgeCommit message (Collapse)Author
2018-01-18all: Simplify definition of EAPIVincent Torri
This will help in the transition from Autotools to Meson. This has been tested on Windows for which EFL_XXX_BUILD were first introduced.
2017-12-14evas filters: Add "alphaonly" flag for blend and blurJean-Philippe Andre
This is very useful to specify precisely which kind of RGBA -> Alpha conversion you want. If all you wanted was the alpha layer to use as a mask, set this flag to true. @feature
2017-09-06filters: Safety++Jean-Philippe Andre
This is an attempt at fixing crashes in empc. Test scenario: ELM_ACCEL="" elementary_test -to "Gfx Filters" And mouse scroll like crazy in the spinner. @fix
2017-08-25evas: use output instead of default one during rendering of proxy.Cedric BAIL
2017-08-25evas: make filter handle multi output.Cedric BAIL
2017-08-02evas filters: Disable extra debugJean-Philippe Andre
Forgot to remove that! It's better to disable for the release, DBG() and XDBG() are disabled anyway. CID 1308611
2017-05-12evas: stat introducing a concept of engine and output in the backend.Cedric BAIL
2017-04-14evas filters: Fix async RW renderingJean-Philippe Andre
This fixes a crash (when deleting the output image), and rearranges the code a bit.
2017-04-14evas filters: Cleanup unused buffersJean-Philippe Andre
This might not be used as over two consecutive runs all the same buffers should be used. But it could happen if some parameters in the filter change (eg. blur radius). Fixes major (GPU) memory leaks. Reuse mode is still leaking.
2017-04-14evas filters: Adjust downscale coordinates to avoid artifactsJean-Philippe Andre
This avoids sampling artifacts when moving or resizing a snapshot object over a region with sharp content (eg. text).
2017-04-14evas filters: Fix maps with filtered snapshotsJean-Philippe Andre
Another wonder of evas render... maps, clips, snapshots, filters... This fixes animations with windows that have a snapshot decoration.
2017-04-14evas filters: Avoid creating input buffer for imagesJean-Philippe Andre
When the filtered object is an image, without borders, map, fill info or anything of this sort, then the filter input buffer is really just a copy of the original image. We can skip that to save on memory usage and pixel fetches.
2017-04-14evas filters: Refactor to support reuse of buffersJean-Philippe Andre
This will reuse existing buffers by resetting only the minimum required in the filter context (also reused). Work in progress, as the actual reuse is disabled for now.
2017-04-14evas filters: Avoid unnecessary drawJean-Philippe Andre
This avoids creating one more FBO and doing one more draw, by rendering the image input data directly into the input buffer. This also makes the code common between SW and GL.
2017-04-14evas: Pass obscuring region to the filtersJean-Philippe Andre
This will be most useful in a special case, where a filter is used in a window decoration, applied to a snapshot object. Another optimization that might be wanted is passing a list of update regions (from the proxy or snapshot). The filters don't support the obscuring region yet, only some of the high-level logic is implemented.
2017-04-14evas filters: Fix blur logic and GL buffer handlingJean-Philippe Andre
This corrects two things: - the blur filter high-level logic, that lead to reusing some temporary buffers which contained garbage; - the versatile gl buffer implementation so that it now properly switches between the RGBA_Image and the FBO content (yes, this is insanely slow and inefficient... but it works and that was the only point).
2017-04-14evas filters: Refactor ector and gfx filters A LOTJean-Philippe Andre
Alright, so this is a massive patch that is the result of trying to get rid of unused or poorly implemented classes in ector. Originally ector was meant to support VG but extend to things like filters as well. At the moment, ector's design makes it quite hard to plug in the filters. For now I think it's easier to implement the GL support for the filters directly in the engine, where I hope to interfere as little as possible. This massive patch keeps only the required minimum to support a versatile gl buffer that can be mapped, drawn or rendered to (FBO). It's extremely inefficient as it relies on glReadPixels and lots of texture uploads, as well as conversions between ARGB and Alpha. Another type of GL buffer is a wrap around an existing GL image, but that one is read-only (map or draw: no write map, no FBO). No, all the filters run fine, and the high-level implementation (evas_filters.c) does not need to know whether the underlying engine is SW or GL. One problem though appears with the blending or blurring of some Alpha buffers, the colors are wrong. This patch removes more lines than it adds so it must be good ;)
2017-04-14evas: Rename software filter function typeJean-Philippe Andre
From Evas_Filter_Apply_Func to Software_Filter_Func. Also fix include dir for out-of-tree builds of non-static sw generic.
2017-04-14evas filters: Move blend to software_generic (1/8)Jean-Philippe Andre
This is an attempt at refactoring the filters code so I can later implement GL support. This patch adds a few extra changes to remove avoid calling functions of libevas from the software engine: use the draw functions from static_libs/draw rather than evas_common APIs.
2017-01-17evas: Implement buffer caching for textblock filtersJean-Philippe Andre
This is the most basic optimization that needs to be done for filters to be useful: cache the output rgba buffers for each filtered element. Hopefully this doesn't leak. I'm not making any promises about that though :)
2017-01-17evas: Implement filter sources support for textblockJean-Philippe Andre
2017-01-17evas: Fix tb filters spanning over multiple itemsJean-Philippe Andre
If a gfx filter was applied to a block of text spanning over multiple text items, then it would improperly render as the filter context was stored in the format, rather than the text item. This is fixed by using a list of contexts in the format node rather than a single context.
2017-01-17evas: Refactor evas filters a bitJean-Philippe Andre
This is a preparation step for (experimental) textblock support. Textblock objects won't have a single filter, and the buffer's geometry wouldn't be that of of the object itself. Thus a few internal APIs need to be reworked first.
2016-01-05Evas filters: Use Ector.Buffer instead of RGBA_ImageJean-Philippe Andre
This is a major refactoring of the evas filters submodule. Use Ector.Buffer and the map/unmap methods instead of directly accessing image buffers with RGBA_Image. RGBA_Image is still used under the hood, for two reasons: - Required for the final output (blend onto Evas itself) - Required for the scaling routines FIXME: - Breaks proxy support (ie. all kind of texturing). - This breaks filters support for the GL engine.
2015-06-25Evas filters: Add explicit exec flag in data_setJean-Philippe Andre
This flag should be set iif the string passed is to be executed rather than assigned. This is used to pass complex arguments as data, like tables (eg. color class).
2015-06-25Edje & evas filters: Add extra data from EDC to Lua programJean-Philippe Andre
This also supports color classes (really rough implementation for now, but the API should remain stable). @feature
2015-06-25Evas filters: Pass edje state name & value to the filtersJean-Philippe Andre
From Edje, pass the current state info (name and value) as well as the next state and the transition position when applicable.
2015-06-25Evas filters: Pass text colors to the parserJean-Philippe Andre
This does not implement the full feature yet (Lua variable is not set). This commit also brings various fixes.
2015-06-25Evas filters: Fix runtime, allow state change on the flyJean-Philippe Andre
Now we're ready to implement runtime changes to the filters' state (color classes, edje state, etc...), as the Lua function will be run whenver required.
2015-06-25Evas filters: Add some @internal flags to the doxygen docsJean-Philippe Andre
2015-06-25Evas filters: Add internal function _program_runJean-Philippe Andre
This will allow changing the state of the filter and re-run it without re-creating the Lua_State object. This is to handle size, color, animation state and scale changes (amongst other things).
2015-05-07evas: remove the need to order the header correctly for Windows.Cedric BAIL
2014-10-22Evas filters: Move filter COW to evas global stuffJean-Philippe Andre
It will be shared between TEXT and IMAGE objects.
2014-04-27Evas filters: Add support for Evas_Object_ImageJean-Philippe Andre
This adds filter support to Image objects as well. The exact same filters can run on Text and on Images (provided some colorspace limitations are respected). This basically adds: - Support for RGBA input buffer - Eo entry points for Image filter support - Implement basic filter support in Evas_Image
2014-03-21Evas filters: Add new instruction padding_setJean-Philippe Andre
This will allow forcing a specific value for the filter padding, instead of relying on auto calculation. Two advantages: - Auto calculation can't be perfect, since it will add as much padding as required for the full blur effect - This prepares the path for animations with effects, where the object size does not change over time
2014-03-12Evas filters: Use box blur by defaultJean-Philippe Andre
BOX blur is a lot faster (and easier to optimize, too) than GAUSSIAN blur. Repeating 2x or 3x BOX blur will also give similar results to GAUSSIAN blur (very smooth), but in much less time. Add a count parameter to the BOX blur instruction.
2014-03-07Evas filters: Implement proxy rendering for GLJean-Philippe Andre
Make use of glReadPixel to access the source's pixel data. Use all classic CPU functions to blend and use that data. Save pointer to the GL image and update it with the latest data during target render. Use ENFN's surface_lock, read_pixels, unlock. Also, add some more error checks to make sure the images are valid, or return an error at runtime.
2014-03-04Evas filters: Add return value in filter callbackJean-Philippe Andre
This will inform the client whether an asynchronous filter properly rendered or not. I actually don't know any case where rendering can fail at runtime.
2014-02-20Evas filters: Mark parser functions as EAPI for testsJean-Philippe Andre
The filter unit test case will directly call the parser functions.
2014-02-07Evas filters: Fix proxy usage (source unset)Jean-Philippe Andre
Proxy sources & objects were not properly unset. This results either in crashes (especially in the Edje tests) or dangling objects with tons of references. Remove the refcount increase/decrease, as it is redundant. Store pairs proxy+source instead of just the source in all hashes, so we can unset the is_proxy flag on the proxy when there are no sources anymore.
2014-02-07Evas filters: Rename bind to source_setJean-Philippe Andre
Because that's what we call it for proxy images :)
2014-02-07Evas filters: Remove FIXME and unimplemented codeJean-Philippe Andre
Remove compilation warnings: we don't really need cubic interpolation at this point, we can still add it back later if wanted. Also, make it clear that buffer #2 is the output buffer. Remove meaningless FIXME.
2014-02-07Evas filters: Allocate buffer in the main loop (part 2)Jean-Philippe Andre
Now the allocation is really done in the main loop. Rendering fails, only happens in case of redraw.
2014-02-07Evas filters: Alloc/Dealloc buffers from the main loop onlyJean-Philippe Andre
This is a problem I didn't spot immediately... but with tons of nasty consequences.
2014-02-07Evas filters: OpenGL support part 2.Jean-Philippe Andre
This patch implements the final draw from RGBA_Image to the OpenGL surface. We can even steal the output buffer and redraw it quickly, without having to re-render everything (same as in SW).
2014-02-07Evas filters: Move font draw inside the filters functionsJean-Philippe Andre
Since the filters will have to decide on which engine (SW, GL) to choose from to render the font and the effects, move the font draw call inside the filters module.
2014-02-07Evas filters: Remove (never implemented) motion blurJean-Philippe Andre
2014-02-07Evas filters: Add offset parameter to vflipJean-Philippe Andre
It is not possible to logically handle padding and offset at the same time for a proper mirror effect, unless this is handled directly at the transformation level. Also, add support for blend() operation padding computation.
2014-02-07Evas filters: Add transform filterJean-Philippe Andre
This is the simplest solution I can come up with for "mirror" effects. Displacement maps are HARD to generate and use properly, since the buffer size is unknown until runtime. Even if we align the map to the text itself (using the padding information), it's still hard to describe properly how to apply the displacement map, and to generate it... So let's just add a simple flip operation.
2014-02-07Evas filters: Remove complicated displacement flagsJean-Philippe Andre
The displacement effect is way too complicated. Let's keep it simple and have only one displacement map format (RG + Alpha). Here's what's missing now: - Alpha support, to blend in the input with a variable intensity - Extra padding (see below) Also, the intensity VS. map values are not perfectly defined yet. Problems: How to create a complete mirror effect (map needs to go over boundaries... add extra padding to the buffers).