Commit Graph

265 Commits

Author SHA1 Message Date
Jean-Philippe Andre b6df13b024 evas filters: Move curve to software generic (3/8)
This moves the RGBA premul/unpremul functions to static_libs/draw.
2017-04-14 11:26:42 +09:00
Jean-Philippe Andre 09ff5f419e evas filters: Move mask to software generic (2/8) 2017-04-14 11:26:42 +09:00
Jean-Philippe Andre 0740010a06 evas filters: Move blend to software_generic (1/8)
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-04-14 11:26:42 +09:00
Youngbok Shin 1ab87367d8 evas: give width offset when Evas tries to find ellipsis position
Summary:
If the last item before ellipsis item has bigger width than its advance,
evas_common_font_query_last_up_to_pos() function can find wrong ellipsis position.
When Evas finds a position for non last item, Evas must care about additionally
available space for glyph's width of the given x position.

ex) the last item's glyph before ellipsis item has a tail to draw above the ellipsis item.

@fix

Test Plan:
Test case will added as comment.
(Becasue of font license problem.)

Reviewers: herdsman, raster, jpeg, woohyun

Subscribers: cedric, Blackmole

Differential Revision: https://phab.enlightenment.org/D4727
2017-04-10 12:15:20 +09:00
Jean-Philippe Andre c15fee9bcc evas gl: Fix usage of OSMesa
It seems OSMesa was recently updated to not expose symbols statically,
so dlsym() returns invariably NULL. GetProcAddress must be used. Note
though that the extension "EGL_KHR_get_all_proc_addresses" is not
present (OSMesa is OpenGL, not GLES), and there is anyway no list
of extensions in OSMesa (at the WSI level, glGetString() returns a
ton of GL extensions as expected).

My OSMesa version is 11.2.0 (mesa 17.0.1).

This fixes make check.

@fix
2017-03-14 15:03:25 +09:00
Carsten Haitzler b0530aba4f evas cutouts - quickly avoid huge per issues with large nos of cutouts
i found evas_common_draw_context_apply_cutouts() was procsessing 300+
cutouts and as it's O(n^2)/2 to try and merge adjacent rects for
cutouts this really performs like complete junk. we apply cutout rects
a LOT. this is not the best solution, but it's quick and much faster
than doing the clipouts which drop framerate to like 1-2fps or so in the
nasty case i say (tyls -m of photos in a dir with a 2160 high
terminal).

this figures out the target area to limit the count of rects
significantly so O(n^2) is far far better when n is now < 10 most of
the time. and for the few operations where it's a high value this now
uses qsort to speed up merges etc. etc.

@optimize
2017-01-02 18:53:56 +09:00
Jean-Philippe Andre 2e89702d57 evas: Fix image save with GL engine and orientation
This fixes evas_object_image_save after changing the orientation
of an image in the GL engine. In SW engine the pixel data is rotated
in memory, so things worked fine from the beginning. In GL we may
have to go through loops and hoops in order to rotate and fetch the
data from the GL texture.

This should fix ce45d44.
2016-12-21 13:56:05 +09:00
Jean-Philippe Andre 581505791a evas: Remove context from some engine function
This is for canvas_alpha_get. context is never used.
2016-12-16 10:40:55 +09:00
Jean-Philippe Andre 260d838d22 evas: Remove context from polygon internal functions
It's not used
2016-12-16 10:37:54 +09:00
Awadhesh Singh f5a2602189 evas: fix memory leak in software generic in error case.
Summary:
pixels_tmp  memory need to be free in default case too.

Signed-off-by: Awadhesh Singh <awadhesh1.s@samsung.com>

Reviewers: singh.amitesh, raster, cedric

Reviewed By: cedric

Subscribers: atulfokk, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4473

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-12-12 16:35:49 -08:00
Cedric BAIL 73b308fb66 evas: refactor setup stage and reduce complexity for engine. 2016-12-07 15:47:56 -08:00
Chris Michael 55e2ed5279 evas-software-generic: Add missing EINA_UNUSED for unused function
parameter

NB: No real functional changes, just adding a missing EINA_UNUSED

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-18 08:09:17 -05:00
Carsten Haitzler 3eb0df1022 evas engines - add more support for noscale pixel buffers esp in gl
for gl noscale buffers are texture atlases that are fbo's. the point
is never to scale or transofmr them but to render them pixel for pixel
and just store pre-rendered data where its cheaper to do this than
rebuild every time. this is the enigne infra for sw and gl with the gl
code... it SHOULD work... in theory...
2016-11-17 18:41:32 +09:00
Carsten Haitzler 622277c82a evas - add engine api to get a specific fbo/surf that wont be scaled
this is to allow gl to specifically use an fbo as an atlas for these
kinds of buffers
2016-11-17 18:41:31 +09:00
Carsten Haitzler a479745e4f evas - add a prepare stage for objects before render
preparing an object is a good idea. especially with gl. you want to do
texture uploads BEFORE using textures all in one batch. otherwise this
may mean the gl implementation has to make a copy of your data in a
tmp location then copy it in later when texture becomes "unused" as it
may be in use at the moment, or it may have to stall and wait.

i have seen somewhere around 7-10% speedups on nvidia and intel
drivers with this on given a very special test case i brewed up (1000
32x32 images where i change 1 pixel every frame). this should have
impact really when we are modifying textures a lot. this is all i've
implemented for now, but this should/would/could do much more like
re-order map, proxy renders to render FIRST in a pre-render list
instead of inline and to pre-render fbo/buffer content for complex
objects like text or textblock etc.
2016-11-17 18:41:31 +09:00
Carsten Haitzler e146371ed9 evas modules - only unregister log domain if its registered
some modules did check, some didnt... but this makes them consistent
and silences and eina err log. :)
2016-11-17 18:41:31 +09:00
Derek Foreman 7a978fe58c evas_engines: Send both surface and buffer damage to outbuf_flush callback
Some engines should using sending surface damage, until now we'd only ever
provided them with buffer damage.

The difference is that surface damage is the damage to the surface the
compositor is displaying, and the buffer damage is the damage to the
buffer the client has rendered.  These are different when the client
is using multiple buffers of different ages to render into.

Anything that calls eglSwapBuffersWithDamage, wl_surface_damage() or
wl_surface_damage_buffer() should be using surface damage, and not
buffer damage.

This patch is intended to make no functional change - any flush cb that
used buffer damage before still should.  Actual fixes to follow.

Apologies if I broke any engines - it's a bit of a copy and wasteland
out here.
2016-10-19 16:29:05 -05:00
Jean-Philippe Andre 0f7dfdedfd evas: Fix async filters following changes in EO
EO is now extremely restrictive wrt. threads so that efl_data_scope_get()
can't work outside the main loop. This patch fixes the usage to create
sw buffers as shared objects (accessible from both the main loop and evas
async thread) and use plain old pointers where possible.

The buffers now have no parent because efl_add(CLASS, obj_from_mainloop)
does not work with shared objects. This is bad, as the buffers conceptually
belong to the main loop, and only need to be accessible from the draw thread
for a few calls. The main loop determines their lifecycle.

Fixes T4628
2016-10-06 12:24:59 +09:00
Subhransu Mohanty d54b5fba6c ector: make the ector objects as shared object after eo changes.
As ector objects are acessed by draw thread we need to create it as
 shared object in order to access it from other thread.
 Note: there is some performance lag...

Summary: make ector object as shared eo object to acess from other thread.

Reviewers: cedric, jpeg, raster

Reviewed By: jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4319
2016-09-28 16:02:12 +09:00
Hermet Park c998fd5ee7 evas software_engine: ++safety code. 2016-09-21 16:24:42 +09:00
Hermet Park 545161d954 Revert "evas engine: return as soon as possible if the surface or context is not valid."
This reverts commit 2f158ebe65.

misunderstood ^ operator.
pinged by jpeg.

previous code was correct.
2016-09-21 13:06:18 +09:00
Hermet Park 2f158ebe65 evas engine: return as soon as possible if the surface or context is not valid.
And later, the surface and context are accessed.
So both of arguments should be valid necessarily.
2016-09-21 12:24:49 +09:00
Derek Foreman 5eec34812e evas_engines: Add a redraws_clear callback
This gives us a callback from the main thread after outbuf_flush occurs -
this is useful to get timing right on the drm and wayland engines.
2016-09-08 13:55:24 -05:00
Jean-Philippe Andre b2d92f2626 evas: Implement support for external buffers
This brings support for the eo api for external buffers (like
the old data_set / data_get). The new API now works with slices
and planes.

The internal code still relies on the old cs.data array for
YUV color conversion. This makes the code a little bit too
complex to my taste.

Tested with expedite for RGBA and YUV 422 601 planar, both
SW and GL engines (x11).
2016-09-06 16:55:00 +09:00
Jean-Philippe Andre 2f737e8f3b evas: Change internal function image_data_direct 2016-09-06 16:54:54 +09:00
Jean-Philippe Andre 8ee431572d evas: Switch EO APIs to Eina_Slice for gfx buffers (map)
This adds a plane and eina slice argument to the map/unmap
functions, instead of void_ptr + length.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre 1773ba5d82 evas: Internally switch to Eina_Slice for buffers
This will be used for the gfx buffer map/unmap eo apis.
2016-09-06 16:54:53 +09:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00
Derek Foreman 0c21a926a3 engines: Add a damage_region_set callback
To properly implement EGL_KHR_partial_update we need to know the buffer
damage before any drawing operations take place.  Add a new callback to
software_generic that takes place after combining of surface damage and
swap mode when we actually have this available.

Note: This means the three copy pasta implementations of
EGL_KHR_partial_update scattered around the tree are all wrong.  bummer.
2016-08-19 16:26:20 -05:00
Stefan Schmidt 31f289ff4c evas: engine: remove set but unused variable 2016-08-16 16:22:06 +02:00
Jean-Philippe Andre 8fb2dca520 evas: Implement GL map/unmap for the simple case
Most of the code relies on the software generic engine
implementation, using inheritance between engines.

This fixes expedite image map RGBA test.
2016-08-16 16:14:21 +09:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre f09df82283 evas: Fix call to NULL object 2016-07-19 19:36:43 +09:00
Carsten Haitzler cdbd437c5f evas sw generic - handle alloc failures correctly for map struct
map struct allocation was not handled right - we assumed successthen
later checked for failure with an if() after using the ptr. this
should fix CID 1353722
2016-07-09 12:28:05 +09:00
Oleksandr Shcherbina e3eb246e2c evas: fix typo in description of the engine functions.
Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4010

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 16:40:25 -07:00
Oleksandr Shcherbina 7e0601c980 evas: Get pixels from rendered 3D scene
Summary:
Implemented interface Efl.Gfx.Buffer functions bufer_map/unmap for Efl.Canvas3D.Scene.
Added function e3d_drawable_texture_rendered_pixels_get to module evas_gl_3d
to getting pixels from FBO. Added wrappers for functions
e3d_drawable_texture_rendered_pixels_get and e3d_drawable_texture_id_get
to have possibility call it through engine functions.

Reviewers: cedric, Hermet, raster, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3978
2016-06-03 14:22:33 +03:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Derek Foreman d485e1f161 software_generic: Add wayland dmabuf native surface support 2016-05-18 11:52:24 -05:00
Derek Foreman 0a6cdcc58c software_generic: Call native surface free callbacks
In the near future this will prevent leaking native surface data for
wayland dmabuf buffers.
2016-05-18 11:52:23 -05:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Minkyoung Kim f10672dd74 evas : remove native.func.data variable and data argument of native calblacks.
Summary:
Evas Image should be independent of render engine.
So remove native.func.data member of RGBA_Image, Evas_GL_Image struct.
And remove data argument,too.

Test Plan: Local test, Tizen3.0 mobile, Desktop englitenment

Reviewers: jpeg, spacegrapher, wonsik

Subscribers: cedric, dkdk

Differential Revision: https://phab.enlightenment.org/D3850
2016-04-01 12:09:06 +09:00
Jean-Philippe Andre cb93c26db7 Evas proxy: Implement buffer map/unmap 2016-03-28 16:40:02 +09:00
Jean-Philippe Andre 22353e31e1 Efl.Canvas.Image: Remove object data for maps
The engine is responsible for the complete tracking of
maps.

Also, make buffer_unmap return bool.
2016-03-28 16:40:02 +09:00
Jean-Philippe Andre 488854af2b Efl.Gfx.Buffer: Switch to void* data and signed ints
1. unsigned char* as a return type was not even compatible
   with the default colorspace (ARGB: 32 bits).

2. Change all unsigned to int for... uh... simplicity
   unsigned is more correct than int for things like width,
   size or stride, but in fact having both ints (x,y) and unsigned
   ints makes the code more complex.
   This is a matter of personal taste.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre d5b0b1e683 Evas: Add SW engine map/unmap functions
Also, fix some of the code using them.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 39a970835b Evas: Remove unimplemented border_set/get (engine internal) 2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 28a03d6e19 Evas: Remove unimplemented image comment (internal)
This is a minor cleanup of RGBA_Image.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 326ff9ae82 Efl.Canvas.Image: Implement support for map/unmap
Now the real hard work is to actually implement support inside
the engines: SW and GL generic.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 91e0bdb1e7 Evas: Simplify direct access to image data
This should avoid issues with image_data_get from the engines,
when we really just want to fetch the original data pointer.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 2ba92c07e9 Evas: Add missing cspaces to data_get/put (sw engine)
Also, remove abort() in default case. Leftover abort()
can actually make applications crash.
2016-03-22 14:16:15 +09:00
Tom Hacohen 8706d03b43 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Jean-Philippe Andre 20b4d9dd6a Evas engines: Add internal functions for native images
- image_native_init
- image_native_shutdown

init() will be used to test whether the engine supports a
certain type of native image.

Note: Native image support is very much dependent on the engine,
and some stuff like opengl should work everywhere (even in sw
with osmesa) but that's not the case.
2016-03-15 11:11:59 +09:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Youngbok Shin 33ea565347 Evas: Use proper language for harfbuzz shaping
Summary:
Evas Text, Textblock, Textgrid keeps own language information.
This language information could be vary from the result of setlocale().
Especially, Evas Textblock supports <lang> tag. The language could be
changed in the middle of text. All of these language has to be used
for harfbuzz shaping.
@fix

Test Plan: N/A

Reviewers: herdsman, raster, woohyun, tasn

Reviewed By: tasn

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3628
2016-02-04 10:07:08 +00:00
Jean-Philippe Andre c1b4728487 Evas filters: Final fix after the ector refactor
This implements a generic way of scaling buffers, using fake
RGBA_Image wrapping ector buffer maps. The underlying algo is
still the good old linear sw scaler.

Now the filters *should* be back to their previous level of
usability. Performance will probably be even worse than it was
before, for GL, as more glReadPixels may be involved. Optimization
now consists in actually implementing the filters with GL shaders.
2016-01-05 16:02:27 +09:00
Jean-Philippe Andre 9e0670a705 Evas filters & Ector GL: Prepare ground work for GL buffers
This fixes crashes, adds safety, and notes a couple of things that
are not yet implemented:
- Make an Evas_GL_Image from an RGBA_Image so we can draw it on the
  canvas. This means Evas.Ector.GL.RGBA_Image.Buffer
- Readable Evas_GL_Image objects with gl_read_pixels
  --> Implement proper map() & unmap() for GL buffers
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 57902fffd3 Evas filters: Use Ector.Buffer instead of RGBA_Image
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.
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 7a8879ba8b ector: add engine-specific evas image buffer wrapper
Since Evas still relies entirely on Image_Entry and Evas_GL_Image,
we will need an engine-specific wrapper object creating a Buffer
around an existing cached image.

Currently only SW support is implemented. GL will be more fun to
do (with glReadPixels and whatnot).
2016-01-05 15:43:43 +09:00
Cedric BAIL 34a892dbab evas: provide ector with a way to get GL symbol. 2016-01-05 15:43:43 +09:00
Vincent Torri 47ed848a87 Evil: integrate the dlfcn code into Evil
This will remove some incompatibilities with other packages,
especially for win-builds
2015-12-29 22:13:58 +09:00
Jean-Philippe Andre 4bcea3eada Ector: Move cairo surface back to ector
The original plan was to have two different surfaces for GL and SW,
but this is probably not going to happen anytime soon. So, move
the implementation back to lib/ector. This avoid a file duplication.
2015-12-03 18:42:50 +09:00
Jean-Philippe Andre 615b2442b7 Ector: Move drawhelper to static_libs
Rename a few things:
 - draw helper -> efl_draw
 - Ector_Rop -> Efl.Gfx.Render_Op
 - ECTOR_ bla bla -> DRAW_ bla bla (base pixel ops)
 - ector_memfill -> draw_memset32 (and invert arg order to match memset)

The main rasterizer file is now draw.h in static_libs/draw
This is a non functional change, simple code refactor.
2015-12-03 18:42:50 +09:00
Jean-Philippe Andre bad7911cd0 Ector: Use Ector Buffer inside SW and Cairo renderers
Ector Surface now inherits from Ector Buffer, and the current
two renderers (SW and Cairo SW) use Ector.Software.Buffer
implementations for pixel surfaces.

Basic pixel handling is merged and will allow easy extension
(color conversion, etc...).

Buffer classes are Mixins to be fully implemented by the final
class, such as: Ector.Software.Buffer, Ector.Software.Surface
or Ector.Cairo.Surface.

This is a large ugly commit. Sorry.
The code is quite a mess right now.
2015-12-03 18:42:50 +09:00
Cedric BAIL 412191e5f8 ector: improve uploading of GL texture for vector graphism
This rely on a faster code path to upload dynamic texture. Once we get support
for gbm, we should see significant performance improvement in speed, but this
first step is already a 5 times improvement (Ok, we get from really bad, to not
really useful...).
2015-11-19 14:52:10 +01:00
Jean-Philippe Andre cc4b54ec0a Evas GL: Fix failing make check test case
The version field was not properly set for GLES 1 and 3 (but not tested),
double free() could happen on the API structs, and empty API structs
could be returned.
2015-11-16 19:44:20 +09:00
Wonsik Jung 84cb06784e Evas sw_generic/x11: Fix calls to native_bind_cb/unbind_cb
Summary:
In Evas-SW-Generic/X11, native_unbind_cb is not called sometimes, although
native_bind_cb was called.
Some native surface's cases, both native_bind_cb and native_unbind_cb should
be called for mapping and unmapping, eg. with tbm_surface.

@fix

Test Plan:
Evas Native Surface with pixmap sample.
Evas Native Surface with tbm(this sample can work in Tize Device)
elementary_test

Reviewers: raster, jpeg, cedric, spacegrapher

Subscribers: JoogabYun, scholb.kim, dkdk

Differential Revision: https://phab.enlightenment.org/D3317
2015-11-11 14:36:20 +09:00
Jean-Philippe Andre 7974f674aa Evas: Allow edje_decc to work with ETC images
This reuses the internal function data_get, data_put, image_save
respecting the border information and adding support for ETC
formats.

@fix
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 64de2f6ce5 Evas: Add some internal engine APIs
- image_file_colorspace_get
   This will be used to determine the best loading format, especially
   targeted at edje_cc / edje_decc so we can avoid ETC re-encoding.

- image_data_has
   Checks whether the image is currently loaded in (CPU) memory,
   and also returns the current colorspace.
2015-11-10 16:12:21 +09:00
Carsten Haitzler de33ab24c5 evas - software render async - fix async render to actually be all async
so the evas thread renderer didnt START rendering until evas FINISHEd
walking all objects generating a render queue. this means all the cpu
time spend generating commands couldn't allow a parallel thread
actually go and DO the rendering.

this flushes the render thread every render command thus waking up the
render thread to work in parallel to the mainloop generating commands.
this actually means int he traces i see the render thread finished byt
he time evas_render completes thus brinign forward the frame display
by quite a bit.

thanks to evlog for pointing this out.

@fix
2015-10-22 15:18:16 +09:00
Jean-Philippe Andre 561481f6ad Evas GL: SW engine CID fixes
Following previous changes, there was unreachable code.
- CID 1327421
- CID 1327420
2015-10-16 10:49:34 +09:00
Jean-Philippe Andre 9c69d4c1e1 Evas GL: Error out on surfaceless make_current with OSMesa
While OSMesa may support surfaceless contexts, we don't support
them yet in the SW engine. Instead of switching to NULL, NULL,
let's error out and do nothing instead.
2015-10-15 16:20:53 +09:00
Jean-Philippe Andre 425265ca6d Evas GL: Fix support for the SW engines (OSMesa)
Since @raster changed the behaviour of the dirty flag on images,
damages must be added to redraw the GL surface. Evas_Image checks
if it is an Evas GL surface by looking at its native surface.
But in case of SW engine, there was no native surface information
for Evas GL surfaces. Also, the OPENGL surface type was awfully
abused for OSMesa support. Luckily EVASGL surface type lets us
pass arbitrary pointers :)
2015-10-14 20:14:51 +09:00
Jean-Philippe Andre a23fcb8b71 Evas GL: Implement glGetString wrapper for OSMesa
This is only one step into making the software engine actually
work the same as a proper GL engine from Evas GL APIs point of view.

This is necessary for the test suite (coming next).
2015-10-14 19:46:47 +09:00
Jean-Philippe Andre 7b266b5518 Evas render: Fix proxy source_clip logic inversion
As spotted by @FurryMyad I inverted the logic for source_clip.
This should restore the proper behaviour while keeping my previous
fixes working. See D2940.
2015-10-14 11:14:36 +09:00
Jean-Philippe Andre a8243ed382 Evas: Add engine function image_ref
This is to simplify and fix filters. This is an internal function.
2015-10-12 13:44:44 +09:00
Tom Hacohen 3301d869df Evas engine software generic: Fix clang warning.
Double parenthesis comparison is reserved for evaluation for assignment, not just comparison.
So for example you should do ((x = 2)) and (x == 2), but not ((x == 2)) or (x = 2).
2015-10-09 12:41:29 +01:00
Carsten Haitzler f05686c051 evas engines - fix partial swap to not skip swaps if full mode used
@fix
2015-10-06 14:37:10 +09:00
Carsten Haitzler ab1734ea19 evas sw generic - printf debug remove 2015-10-06 12:19:08 +09:00
Carsten Haitzler 8a4ddea224 evas render - async sw - fix context duplication by using proper dup call
valgrind pointed this one out. we access freed memory when we dup a
context because the context CONTAINS ptrs to things like rects for
cutouts. we didnt dup these. use the proper context dup call (and
properly ref pixman color image too). this was a random bug/crash
waiting to happen and valgrind caught it. suprising it hasnt turned up
before :/

@fix
2015-10-04 16:58:42 +09:00
Carsten Haitzler 11c29579d0 evas gl - optimize updates
@feature

this makes the gl engine by default not do bounding box, but instead
try and smartly merge nearby update regions. this means multiple
render passes IF your drivers support buffer age, but it seems to
actually help. in my test case on nvidia drivers which support buffer
age, i saw compositor cpu overhead drop by about 30%
2015-09-25 14:38:21 +09:00
Carsten Haitzler 0369168a44 evas sw generic - comment NULL methods so we know what they should be 2015-09-22 18:49:12 +09:00
Subhransu Mohanty 291c3e32af evas: create ector surface per engine instance.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-21 22:50:34 +02:00
Subhransu Mohanty b6e458804e evas: clip the clip rect to surface boundary in ector draw.
Change-Id: If747a055eb935a7369eaf8d16d1577200a23b54c
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-21 22:50:33 +02:00
Jean-Philippe Andre 69cbbc2184 evas: Add internal context_dup function
This will simplify some code related to clipping and masking.
2015-09-04 11:11:39 +09:00
Jean-Philippe Andre d69f9e0b84 Evas masking: Fix potential invalid access to mask image
After clip_image_get, the old mask may be replaced by a new one,
and unref'ed, but it is later on set back as the context mask image.
Maybe it's possible that there was 0 reference and the image
got freed in between.

No idea how to test this.

@fix
2015-09-04 11:11:39 +09:00
Cedric BAIL 7c83af2ae3 evas: fix ref/unref of ector renderer to always happen in the main loop. 2015-08-19 16:06:39 +02:00
Jean-Philippe Andre c45ae022c8 Evas masking: Fix crash in async rendering
There was a FIXME comment... >_<

Improper management of image resources in async render led to
a rare crash. This should fix that.

@fix
2015-07-27 14:15:09 +09:00
Jean-Philippe Andre 8942c0c29b Evas GL: Fix sync, wlbuffer and image egl ext functions
Before this patch, those EGL/EvasGL functions can not work
without a current context. But EGL does not require any
current context for those to work, or at least, this should
be left to the driver to decide.

Evas GL was only able to get a pointer to the display
if a context was current.

The display pointer should be infered from Evas_GL unless
we can find a current display. EGL does not require a
context to be current in most of these function calls.

This should bring evasgl a little bit closer to EGL in terms
of behaviour (those are EGL-only extensions, btw).

Thanks @spacegrapher for the quick review

@fix
2015-07-17 14:47:42 +09:00
Jean-Philippe Andre b439fafa17 Evas GL: Fix internal function pointer
evas_gl_native_context_get is an internal function
passed around from an evas engine to evas_gl so that we can
implement evasglCreateImageForContext without exposing
any evas engine internal structure to evas_gl.

It's all a ittle bit ugly but the previous solution with
dlsym(DEFAULT) didn't work.
2015-07-16 19:50:38 +09:00
Carsten Haitzler 59db1cd0e2 evas - unload/scalecache self-feeding loop unload/reload fix
i was runing perf top and noticed that evas_image_load_file_data_eet(0
was being called. in fact - it was #1 on the list of functions being
called. why? it didn't make sense. i found out. just a blinking cursor
in terminology was causing the background to be unloaded and
re-loaded. the new "actually unload" changes for 1.15 made this happen
and thus we kept sucking in new data all the time even if the
scalecache already had the data - and that was the problem.

so now calcecache prepare tells you if you don't have cached data and
if you likely then have to ensure the data is loaded. this cuts down
quite a bit of work.

while i'm at it... we definitely need to clean house on the internals
of evas. a decade+ of features, mess, optimizations needs to be fixed.
i mean really house-cleaned. rewritten clenl;y re-using existing code
where appropriate.
2015-07-12 13:17:08 +09:00
Jean-Philippe Andre b5c9350805 Evas: Replace image_map_surface_free by common image_free
Those two functions were doing exactly the same thing[1], which
is free an image, so this commit only attempts to simplify the code
a little bit.

[1] Actually image_map_surface_free() might even not have worked
properly with cserve2 sw (calling unload instead of close).
2015-07-02 12:05:50 +09:00
Jean-Philippe Andre fd4e133cc1 Evas: Implement image_data_get for FBO images 2015-07-02 11:58:50 +09:00
Cedric BAIL 7a1da35e22 evas: use the right function with freetype backend. 2015-06-16 17:23:05 +02:00
Subhransu Mohanty aac9bee035 evas/engines : renamed ector native engine to "default" from "freetype" 2015-06-12 19:56:57 +09:00
Stefan Schmidt d50cebbd4f modules/evas/engines/software_generic: No need to check enums for smaller 0
Evas_Image_Orient is an enum starting at 0 thus we never go below 0. Remove
unneeded checks.

modules/evas/engines/software_generic/evas_engine.c:1558:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
modules/evas/engines/software_generic/evas_engine.c:1560:8: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
2015-06-08 17:09:38 +02:00
Oleksandr Shcherbina d88ccf06a5 evas: use Evas_GL_image for generate texture unit for Evas_3D_Texture.
Summary:
Used engine function for load image/data and use texture unit through
Evas_GL_Image object
Used Evas_ColorSpace format instead Evas_3D_Color/Pixel format
Added transformation matrix for adjusting texture unit coordinates in shader
Added property in Evas_3D_Texture for mark possibility get texture without atlas
(see https://phab.enlightenment.org/conpherence/54/, I suppose it will done
after this patch)

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2371

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:09 +02:00
Cedric BAIL f93cc6fe3b evas: fix issue of using two times the same image with different orient in software.
Fixing T2338
2015-04-27 19:18:04 +02:00