Commit Graph

284 Commits

Author SHA1 Message Date
Carsten Haitzler 217faeebe8 evas cutouts - optimize to use less cpu
this optimizes draw ctxt cutouts by skipping small ones and
remembering the last cutout added so it isn't double-added as well as
extending the minimum cutout array to 512 and going up in blocks of
512 instead of 128. also optimize the clipping code a bit more.
2015-09-24 14:09:20 +09:00
Carsten Haitzler 49adf8aa47 evas tiler update handler - move to region code to be accurate and fast
this move evas tiler that does update handling to use fully correct
regions using region.[xh]. this also removed old unused regionbuf code
and a bunch of commented out code no longer needed. much simpler now
and easier to maintain.
2015-09-24 14:09:09 +09:00
Oleksandr Shcherbina 28d69200f9 evas_canvas3d: sets for shadow rendering
Summary:
Add possibility change quality and offsets for shadow.
Add mesh API's to sets size, step and bias constant.
Add scene API to sets depth values.

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-21 23:41:29 +02:00
perepelits.m 64a7b3d44f evas: remove unused variable in evas_tangent_space_get.
Summary:
Firstly it was the main point of in CID1323089 from Coverity, but this variable is unused. So I've deleted it.

CID1323089

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-21 23:20:02 +02: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
Jean-Philippe Andre 00cf9e2fc5 Evas: Move REND_DBG to evas_render.c
Unlike what the comment claimed, it is not being used anywhere outside
this file.
2015-09-04 15:13:35 +09:00
Jean-Philippe Andre ef0ec6bed3 evas_render: Fix some clipping issues inside proxy
Inside a proxy, clipping information might be wrong since the
source object may be at a different position than within
the proxy. If source_clip is not set, then we need to discard
all clips that are outside the proxy context.

So we just propagate the clip information inside the current
draw context, and even recurse from clipper to clipper to
find the final state of clipping.

Map and proxies and others (who said masks?) should definitely
rely more on the same model.

This code is not a mess. At all. You gotta love evas_render.
2015-09-04 11:11:58 +09:00
Jean-Philippe Andre f654a3b300 evas_render: simplify masking and clipping in general
Use context_dup to inherit from previous contexts in a clean
manner. This removes the need for restoring the previous
clip information.

Plus, this commit removes lines of code so it must be good, right?
2015-09-04 11:11:39 +09: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
Carsten Haitzler 9d9e8ffab5 evas - handle case where layer->evas is null - don't crash
there seems to be a corner case where obj->layer->evas is null for an
object. i think during shutdown of a canvas.

@fix
2015-08-12 20:08:14 +09:00
Cedric BAIL 033658d1ca evas: implementation of snapshot feature.
This should theorically work, need some test. Design is easy to understand. Render
every part of a snapshot object by rendering the content below it, before rendering
the stack above it using that object content.
2015-08-05 15:12:33 +02:00
Cedric BAIL 2ebf315591 evas: add a snapshot bool to Evas_Object_Image.
Snapshot object are rendering the content of the canvas below them into them.
They can then be used for filter, map or proxy.

Have fun !
2015-08-05 15:12:33 +02:00
Daniel Kolesa 1ff8ab7d8e evas_3d_utils: fix compiler warning 2015-08-05 11:12:24 +01:00
perepelits.m be33840b6b evas: add tangent space algorithm
Summary: This is a logic of tangent data calculation, we need it in order to avoid bugs with normal mapping after building with opengl=yes.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: Oleksander, cedric, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-08-04 17:34:29 +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
Jean-Philippe Andre 326dc3850b Evas masking: Fix rendering of masks that belong to a proxied smart object
This is a complex situation:
- Smart object A contains image I
- A is proxied into an image B
- B is marked as source_invisible, which means A is invisible
- Mask M is applied to image I
- Mask M is ALSO a smart child of A
Because of all that, mask M could not be rendered into its private
mask surface, as it was falling under the case of "parent_src_invisible".

This patch checks that the object is not a mask during the
parent_src_invisible check.

@fix
2015-07-15 16:41:59 +09:00
Carsten Haitzler ec6ddf59e2 evas - image core - fix unloading of images to work again
i think this has been disabled for a while. image unloading is broken
- esp with gl enigne as due to async move it was effectively disabled.

this re-enables it. unloading is deferred with a managed list of things
needing unloading and then when any async sw renders are not busy any
more - do the unload then in the mainloop of all pending/flagged
images to unload

@fix
2015-07-07 21:38:21 +09:00
perepelits.m e40c223181 edje: add Convex Hull logic
Summary: This is an algorithm which calcuates a convex hull of some mesh, in fact it returns vertex, index, normal and color datas, though the new mesh could be build just as for AABB

Reviewers: raster, Hermet, cedric

Subscribers: cedric, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-07-04 02:39:11 +02: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
Daniel Kolesa c709f1dca2 eolian/generator: constify all prototypes for @const functions
Otherwise there would be conflicts in certain circumstances.

This also requires adding const on many existing functions,
and similar work is necessary in Elementary.

@fix
2015-06-25 12:18:43 +01:00
Jean-Philippe Andre d15308efef Evas filters: Add explicit exec flag in data_set
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-25 14:36:09 +09:00
Jean-Philippe Andre 0e8f890dfb Edje & evas filters: Add extra data from EDC to Lua program
This also supports color classes (really rough implementation for
now, but the API should remain stable).

@feature
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 84e3dd5c34 Evas filters: Add name to the filters
Deep down internally there was already a name, but no API could
really set it properly.
Here Edje will set the name of the filter based on the part name
or the data item name if relevant.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 64fd278c62 Evas filters: EO-ify the filters API
This creates the new interface
 Efl.Gfx.Filter

And the implementation is a mixin (evas_filter_mixin.c):
 Evas.Filter

All the filter rendering code has now been moved to this
new file. TODO: Merge image filtering.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre f3e16bc485 Evas filters: Implement Lua classes for colors & buffer
Reuse previous code for buffer. Keeps API stability.

The new class "color" is here for a more convenient color
representation. This way, colors can be represented in more
natural ways like: {r,g,b[,a]}, 0xaarrggbb, "red", "#rrggbb"

Class color is implemented in pure Lua, and adds a .lua file
to Evas' share folder.
2015-06-25 14:36:08 +09:00
Jean-Philippe Andre 93797e3b0d Evas filters: Create specific log domain
This will improve the debug output of evas and specifically
allow setting "evas_filter" log level to a higher or lower
value depending on what you are debugging :)
2015-06-25 14:36:08 +09:00
Jean-Philippe Andre 225c0f937a Evas filters: Pass edje state name & value to the filters
From Edje, pass the current state info (name and value) as well
as the next state and the transition position when applicable.
2015-06-25 14:36:08 +09:00
Jean-Philippe Andre ffea07a049 Evas filters: Pass text colors to the parser
This does not implement the full feature yet (Lua variable
is not set). This commit also brings various fixes.
2015-06-25 14:36:08 +09:00
Jean-Philippe Andre d148c0f0d2 Evas filters: Fix runtime, allow state change on the fly
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-25 14:36:08 +09:00
Jean-Philippe Andre ed09b3af6d Evas filters: Add some @internal flags to the doxygen docs 2015-06-25 14:36:08 +09:00
Jean-Philippe Andre 2faaef966e Evas filters: Add internal function _program_run
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-06-25 14:36:08 +09:00
Oleksandr Shcherbina d409df1caa evas: change interface evas_3d to evas_canvas3d
Summary:
Regard to https://phab.enlightenment.org/T2479 it is need for right generation
Eolian files

Reviewers: cedric

Subscribers: cedric, tasn

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-17 17:52:17 +02:00
Jean-Philippe Andre 111e51a6ff Evas: Add "no-render" flag for proxy sources & clippers
Those objects should never be rendered on the canvas, even if they
are visible. On the other hand, they need to be rendered in mask or
proxy surfaces.

note: this patch includes some extra whitespaces changes :(

@feature
2015-06-15 16:59:41 +09:00
Carsten Haitzler 25983dcedd evas render2 work - begin to make rectangles deal with render 2 basic
infra
2015-06-09 17:34:39 +09:00
Ivan Furs a88aebe8cc evas: for aabb add interpolation frame when base frame is not found
Summary:
Old algorithm searched specified frame of the base frame and when it could not find the specified frame it ignored. So the bounding box was not synchronized with the object.
New algorithm always returns specified base frame or frame interpolation between the nearest base frames. That does synchronizes mesh object and his bounding box.

Reviewers: Hermet, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-03 17:14:12 +02:00
se.osadchy 684c51360f evas: fix color pick compatibility of Evas_3D with GLES.
Summary:
Use fourth component texture. Update mechanism generation pixels, scene renderer
to texture and geting color pixels from texture. Update shader for color pick.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: Oleksander, cedric

Differential Revision: https://phab.enlightenment.org/D2549
2015-05-27 00:31:07 +02:00
Bogdan Devichev 6dac83e643 evas: add API for creation Evas_3D node primitives.
Summary: Now mechanism of creation of primitives is similar to model loading.

Reviewers: Oleksander, Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-27 00:31:07 +02:00
Oleksandr Shcherbina fc4f755c28 evas: fix coverity CID 1297159 and CID 1297158.
Reviewers: Hermet, b.devichev, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-13 16:20:22 +02:00
Cedric BAIL 71b7fc982a evas: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +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
Chris Michael f7fb534562 evas-blend-ops: fix off-by-1 in the C MUL3_SYM "simd" multiplier
Summary: op_blend functions give off-by-1 using NEON intrinsics in C
MUL3_SYM, this commit fixes that issue with no ill effects on other
platforms.

@fix

Reviewers: raster, cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2394
2015-04-21 11:26:03 -04:00
Jean-Philippe Andre 5e832dfa76 Evas GL: Disable direct rendering if there is a map
The engine itself (gl_generic) will detect whether the target
surface (canvas where to draw the gl stuff) is the window
backbuffer or not.
2015-04-14 21:19:13 +09:00
Bogdan Devichev f8f118f058 evas-3d: T2226 (Evas Eet saver does out of range access) fixed.
Summary:
texcoord now is 2D vector

@fix

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2233
2015-04-06 14:13:30 +09:00
Oleksandr Shcherbina bc8dfbb1ef [evas/evas_3D] Billboard mechanism
Summary:
Add pointer to target billboard node in Evas_3D_Node
Skip set flags change orientation for billboard node
Add method node_billboard_update to use it for change orientation during traverse
by nodes
Split API evas_3d_node_look_at_set to have possibility change orientation of node
without set flags

Reviewers: cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2245
2015-04-06 14:10:28 +09:00
Cedric BAIL b18b1e89ff evas: fix Windows build. 2015-04-03 16:34:22 +02:00
Cedric BAIL de08a3bc04 ector: add reference point to define (0, 0) and don't repeat the same value everywhere. 2015-04-03 16:33:19 +02:00