Commit Graph

332 Commits

Author SHA1 Message Date
Carsten Haitzler 15b9ac2d25 evas - lock render updates as this happesn to be accesed from threads 2015-09-28 02:58:54 +09:00
Jean-Philippe Andre 8fe237c088 evas_render: Fix invalid clip
Test case: elementary_test -to "Evas Map 3D"
The cube was clipped to its top-left corner.

What's really weird is that this code patch is for non-mapped
objects.
2015-09-15 18:29:01 +09:00
Carsten Haitzler 8291c9e33e evas - sw async render - move pixel upload/swap to a thread
@feature

this should unload mainloop some more and have pixel upload now in a
thread - same as rendering. this eeems to work where i see it so let's
put this in and see with further testing.
2015-09-15 18:26:35 +09: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 4ac9d2af54 evas_render: print out context clip with REND_DBG 2015-09-04 11:11:39 +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 3d003b52de evas_render: Cosmetic changes in evas_render_mapped
Use ENFN, ENDT macros to simplify code.
I believe it is more concise and readable like this.
2015-09-04 11:11:39 +09:00
Jean-Philippe Andre bcbf7d14e6 evas_render: moar debug (REND_DBG) 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 08e888156e evas: force full redraw of snapshot for every frame, every time.
NOTE: it would be nicer to setup a specific context for each snapshot
and walk all the child below. If any of them did change, only trigger the
full redraw in that case (and of course only if a filter with blurr does
use it somewhere).
2015-08-06 11:05:50 +02:00
Cedric BAIL 941d75d24d evas: move make update to be outside of the reused code for rendering sub objects. 2015-08-05 15:12:33 +02:00
Cedric BAIL 46082eb13d evas: make sure that the context is only relevant to the surface we are currently manipulating. 2015-08-05 15:12:33 +02:00
Cedric BAIL c5c94ce027 evas: we now need to force mark the object as changed. 2015-08-05 15:12:33 +02: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 8b31b7c33a evas: prepare refactoring necessary for snapshot. 2015-08-05 15:12:33 +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
Carsten Haitzler e0c81ed35f evas render - fix up debug macros so they don't generate any code
if render debug is not enabled make sure they end up totally empty to
avoid any possible overhead from the optimizer not stripping them out
2015-07-24 22:11:40 +09:00
Jean-Philippe Andre 29de62cd13 Evas: Fix no_render flag when in a map
no_render objects would still show up in a map surface
because of a different logic.
2015-07-15 17:51:18 +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
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 8c47364846 Evas render: Fix rendering of objects with no_render
Well yeah, those objects should still be rendered in their
proxy or mask surface :)
2015-06-25 14:36:08 +09: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
Carsten Haitzler 8a101cd8f0 efl - add more evlog points
@feature
2015-05-14 17:35:22 +09:00
Jean-Philippe Andre 5209aaebdb Evas masking: Free mask surfaces during evas dump
On minimizing, free all mask surfaces. This could save a lot
of memory.

Also, write "proxy" COW only when there is a surface (the "proxy"
pointer itself is always valid and non-NULL).
2015-04-27 16:40:34 +09:00
Jean-Philippe Andre a871ac96a8 Evas masking: Skip GL fast path for border images
Right now the engines don't support mask tiles so we can't
just scale up an image on-the-fly when doing a masking operation.

Skip fast path and force render of border images into their own surface.
2015-04-17 09:33:37 +09:00
Jean-Philippe Andre 4227bae2b6 Evas render: Fix debug logs
Those are only printed out if REND_DBG is set to 1 in evas_private.h
--> Non functional change.
2015-04-17 09:26:49 +09:00
Jean-Philippe Andre b0c6a32d68 Evas render: Fix double-clipping issue with maps
Situation:
 - Evas Object A has a clip C and a map M.

Problem:
 - Clip C will be applied once inside the map surface S and
   again when the surface S is drawn to the canvas.

Solution:
 - Track whether the current object is the mapped object
   or a child of the mapped object. In the first case,
   discard the clipper when rendering to the map surface.
   In the second case, the child's clipper is PROBABLY[*]
   inside the map, so it should be applied when rendering the
   map surface itself.

Note: This also applies to masks.

[*] This is clearly not the ultimate clipping fix.
2015-04-14 16:37:12 +09:00
Subhransu Mohanty 1c093f3660 evas: fix EVAS_RENDERER_DEBUG_TIMING implementation for async rendering
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-03 16:34:15 +02:00
Carsten Haitzler 2347c6ff01 evas render2 - restructure it to be an explicit api call - cleaner to do 2015-03-20 18:03:54 +09:00
Jean-Philippe Andre 29be7a36c7 Evas masking: Fix rendering of masks into invalid surfaces (GL)
In some rare cases, a mask would be rendered (from mask_subrender)
into a surface that is NOT an FBO. This would happen because the
previous surface was a "scaled GL image" and its size would
match the required geometry.

That took a while to figure out...
http://thecodinglove.com/post/111546429281/when-i-finally-solve-a-nasty-bug
2015-03-12 11:32:15 +09:00
Jean-Philippe Andre 2e3ee0e658 Evas masking: Fix double free() with scaled images
The function image_scaled_update() frees() the old scaled image
passed as input if it doesn't match the old dimensions. This commit
will avoid double frees.
2015-02-27 17:56:49 +09:00
Jean-Philippe Andre ab89dc401c Evas masking: Check fill properties to consider image as filled
Edje may not set the filled flag on an image even if its fill
properties make it fill the whole object. For masking, it can
then be considered as a filled image.
2015-02-27 15:57:36 +09:00
Jean-Philippe Andre 0d794e0b37 Evas masking: Skip GL fast path if image has fill options
If the image is not "filled", then we can't assume its image
source geometry is the same as its texture geometry.

Note: Implementing a fast path for non-filled images would
      require a hell of a lot more work (need to cut the render
      into a lot more triangles) for little real-life use.
2015-02-27 13:33:51 +09:00
Jean-Philippe Andre fab0d7f9d3 Evas masking: Simplify previous commit
Call object's function to get the private engine_data (here, the
image object). Thanks Dongyeon for your patch which inspired me to
do that instead of forcing pre_render.
2015-02-27 13:06:09 +09:00
Jean-Philippe Andre fddaf62fcc Evas masking: Add fast path for image-only masks in GL.
This will currently optimize most of the masks when using the
GL engine[1].

This is a very special case that adds a highly optimized path
for masking in GL. It works by creating a virtual image, containing
a pointer to the original image and a new geometry[2].

Instead of creating a new FBO-based surface (image_map_surface),
we refer to the original image and adjust the mask geometry on
the fly.

KNOWN BUGS:
- masking a map with such a scaled image is now broken.

[1] Right now all masks are simple Evas Object Image, so that means
    all cases of masking, except masks of masks, or masks of maps,
    will be optimized with this new method.

[2] This virtual image mechanism is still quite hackish and may
    be improved (for memory usage, refcounting, etc...)
2015-02-27 13:06:09 +09:00
Carsten Haitzler 7c5f92d702 evas - render - have lock point to allow for async obj walk + update add
this adds a lock for when walking all the objects to generate render
commands for an async render. this allows even the object tree walk
plus update area caluclation to be moved off into async if every oject
that can change canvas state actually does so correctly. this change
adds all those lock block calls to synchronise with an async object
tree walk.
2015-02-12 11:06:40 +09:00
Jean-Philippe Andre 7a50f5827f Evas render: Improve debug output with REND_DBG
Better formatting and less code clutter.

This is a purely non-functional change as all the
changed lines are ifdef'ed out by default.
2015-02-10 12:00:37 +09:00
Jean-Philippe Andre 69818e7c45 Evas masking: Fix another issue with masking
Fixes rendering in the following case:
- Object with a map has a mask
- Object is child of smart object which also has a map (eg. transit)
--> Masking did not apply to the children before this patch.

NOTE: This works fine in SW but still didn't work in GL, see the
      following commit...
2015-02-05 22:31:16 +09:00
Jean-Philippe Andre 9466f32dae Evas masking: Fix rendering of restacked masks of masks in a map
I know. This title does not explain anything. Whatever.

This fixes the following issue:
- Mask a genlist (big mask)
- Each item has an icon masked (small mask)
- Apply a map to the genlist
- Scrolling the genlist
--> The big mask still works but totally screws up the
    small icons with masks.

Note: Once again this patch only affects code paths where an
      object is a mask.
2015-02-04 15:03:41 +09:00
Jean-Philippe Andre a688ba45c8 Evas masking: Fix some remaining issues with animations
Yeah, mixing maps and masks of masks in a genlist leads
to tons of amazing bugs :)

This commit removes x,y from the "mask" field in an object,
as they are duplicates of cur->geometry.{x,y} but were not
properly kept in sync.

This patch fixes a situation of:
- A genlist in a map
- Each item has an icon masked
- Scrolling the genlist
--> The masked items would not render properly before this
    patch.

Remaining known problem:
- Mask a genlist (big mask)
- Each item has an icon masked (small mask)
- Apply a map to the genlist
- Scrolling the genlist
--> The big mask still works but totally screws up the
    small icons with masks.

Note: These changes look scary just before the release
      but I would have to backport them to 1.13.x as they
      definitely are bug fixes. Also, they only concern
      code paths used exclusively by masking.
2015-02-04 15:03:37 +09:00
Jean-Philippe Andre fbacbf7350 Evas masking: Fix masking of multiple objects in a map
All those masking bug fixes become harder to explain. But here goes:

 - Take a genlist, apply a mask to it (for example put everything
   in an elm_layout). Also play with various objects in the genlist.
 - Also apply a map to it (for instance, elm_transit zoom).

 --> Now some elements will be masked, some others will not,
     and some may even not render at all.

This patch restores a mask in the current drawing context, instead
of just unsetting it.
2015-02-04 12:48:10 +09:00
Jean-Philippe Andre 5fb43d3559 Evas masking: Forward previous mask where needed
In a situation where an object with mask of mask is in a map
(Yes! It can happen!) the masks would not get properly "multiplied".

Now the problem is that some objects still seem to bypass some
masks... Hmm...
2015-02-04 12:48:10 +09:00
Jean-Philippe Andre 89ee8e1446 Evas masking: Prevent drawing masks in the wrong surface
Masks should be actually rendered only to their specific target
surface.
2015-02-04 12:39:49 +09:00
Jean-Philippe Andre 5afa07bf6c Evas masking: Check only the variable we want to set
This is a left-over from a previous fix a few weeks ago.
The point of this "if" is just to avoid writing the COW value
if not needed.

For reference:
  commit f876cf31f8
  Author: Jean-Philippe Andre <jp.andre@samsung.com>
  Date:   Tue Dec 23 18:57:45 2014 +0900
    Evas masking: Fix invalid geometry after mask redraw
2015-02-03 11:12:20 +09:00
Jean-Philippe Andre 5b4e0ece68 evas: fix some clipping issues before/after Evas_Map animations
Summary:
This is an attempt at fixing:
 - T1767: The ultimate evil map & clip bug

Force recalculation and re-propagation of clipper geometry
after or just before a map is applied (only when transiting
between map enabled and map disabled).

I realized that doing clip_unset+clip_set in the E widget
code would fix the issue, but this is not a solution that
makes a lot of sense.

Unfortunately I have no idea about the side effects of this
patch, especially in terms of performance.

Fixes T1767 and maybe T1630.

Test Plan:
Open PackageKit popup in E, check the animations
and that clipping works fine both during, before and after
the animations.

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric, Hermet

Maniphest Tasks: T1767

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-28 09:28:39 +01:00
Jean-Philippe Andre bd818f7eca Evas render: Remove useless code
While invesigating some clip & map issues, I found some very
strange piece of code:
{
  tmp = a;
  a = c;
  a = tmp;
}

This actually comes from a very old code refactoring where a
line in-between was removed:

   tobj = obj->cur.map_parent;
   obj->cur.map_parent = obj->cur.clipper->cur.map_parent;
 - evas_object_clip_recalc(obj);
   obj->cur.map_parent = tobj;

Adding this line back there doesn't seem to do anything anyways.
So, let's just remove useless code.

For the record (legacy evas):
  commit e1f6f3c5f239dfd95a307949acd5f98831c0c3c0
  Date:   Fri Aug 17 06:16:04 2012 +0000
  evas/render - code refactoring.
  SVN revision: 75351
2015-01-27 12:28:08 +09:00
Jean-Philippe Andre a376582b4f Evas masking: Fix masking of mapped sub-objects
Some complex examples of masking with mapped smart objects
would fail miserably, rendering the object without any mask,
and/or showing the mask itself somewhere in white color...
2015-01-26 19:25:36 +09:00
Jean-Philippe Andre 77feb96dd7 Evas masking: Fix rendering of masked objects with maps 2015-01-26 19:25:36 +09:00
Jean-Philippe Andre 4c864f757a Evas masking: And another case of bad mask rendering
A masked object just can't be considered as opaque. As such,
it can't generate an obscure area. This fixes some super
rare rendering bug.
2015-01-23 17:24:51 +09:00
Jean-Philippe Andre 15f7cefa68 Evas masking: Fix major memory leak
The memory usage graph was going up and to the right!
I was told this is always a good thing!

... maybe not this time :)

Hopefully I didn't forget a case. An intense session of
genlist scrolling with masks all over the place and masks
of masks didn't show any glitch, crash or memory leak.
2015-01-21 17:51:15 +09:00
Jean-Philippe Andre 0793dee86a Evas masking: Try to reduce memory footprint a little
Move some mask object pointers around to spare a few
bytes of memory.

Fixes T2025.
2015-01-21 17:38:22 +09:00
Jean-Philippe Andre f876cf31f8 Evas masking: Fix invalid geometry after mask redraw
The proper geometry should be set when rendering the mask,
otherwise we can't create a new surface if it changed dimensions.
2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 73919ea437 Evas masking: Implement mask support in evas_render
This implements supports for masking inside evas_render, which
means:
- Render the mask itself into a surface (ALPHA if possible)
- Pass this mask surface to the draw context
- Apply mask recursively in case a masked object is contained
  by another masked object.

@feature
2015-01-07 15:06:02 +09:00
Jean-Philippe Andre 5a13e97c1b Evas: Use ENFN/ENDT in proxy subrender
Again, just a code readability change.
2014-11-12 19:25:21 +09:00
Jean-Philippe Andre a56cc8a8c1 Evas: Avoid creating an extra context for proxy rendering 2014-11-12 19:18:09 +09:00
Jean-Philippe Andre fe677a0518 Evas: Use common function for proxy_subrender
Merges functions from:
- filters
- image object
2014-11-12 17:11:49 +09:00
Jean-Philippe Andre 4fb138a65f Evas: Remove ugly REND_DBG
Here's a macro that's used for debugging in some of the ugliest
ways possible: avoid passing an extra argument to a function when the
cost of always passing it is negligible (it's an int).

Fixes T1749.
2014-11-12 15:26:59 +09:00
ChunEon Park 4cc893f0af evas/render: don't make children active unless the active object has the proxies.
the src change sholud be true only if the object has any proxies.
otherwise, the children will be pushed in active objects unnecessarily.
2014-09-01 19:54:21 +09:00
Carsten Haitzler 5ca08e65d8 evas render - checking if can overlay was broking checking parent maps
brought out by CID 1039454 - fix!
2014-08-27 12:46:43 +09:00
Tom Hacohen 7f3a44894b Evas canvas eolian: Fix namespace and class name for the evas canvas. 2014-06-30 17:47:06 +01:00
Tom Hacohen 0fc3279db9 Efl: Update code to use the new class names generated by eolian. 2014-06-03 11:28:01 +01:00
Tom Hacohen d9263e6571 Eo base: rename event_freeze_get to event_freeze_count_get.
This is needed because of a possible clash between the method event_freeze
and the property event_freeze with bindings.
2014-06-02 12:50:23 +01:00
ChunEon Park c3cd680fad evas/render - fix segfault because of null cow access.
issue ticket: T1252

@fixed
2014-05-19 22:45:46 +09:00
Cedric Bail b1342d933d evas: our API are always build in, only the header require define to be used. 2014-04-25 16:41:08 +02:00
Taekyun Kim 6856e562ca Evas: 3D: Refined proxy texture implementation
Added new APIs for controlling source object's visibility.
Fixed bugs related to updating proxy textures.
2014-04-25 16:20:24 +09:00
Tom Hacohen 35525a53e0 Adjust eo_do calls to work with the eo2 api. 2014-04-10 04:20:21 +01:00
ChunEon Park 22162a66f3 evas - fix incorrect object reset.
If the children are rendered in the proxy render time,
they should not be reset the changes always since we don't sure
they will be rendered in normal rendering after.

In this case, we leave them as they are.
But maybe they can be optimized by comments says.

@fix
2014-04-01 14:08:14 +09:00
ChunEon Park b1dc908681 evas/proxy - actually, I missed updating is_active of the object.
this commit is introduced by this b2070f8c39.
2014-03-27 16:16:49 +09:00
ChunEon Park b2070f8c39 evas/proxy - redraw proxy source properly.
This patch fixes the proxy drawing problem that source won't be updated in some case

If the image object is the one member of the smart that has the proxy,
the proxy(image part) won't be redrawed properly unless evas tries to draw the image object.
This can be heppend if the image object is inactive cause of some reasone(ie. outside of the screen)
So, the proxy object never can be never updated even the image part is changed.
Now let try to be active if the parent is both active and source object.

and revert previous change with regarded to a739716cee,
that's no more required now.

@fix
2014-03-27 15:47:00 +09:00
Daniel Zaoui 103e89a04a Eolian: Integration of Evas 2014-03-12 10:57:28 +02:00
Carsten Haitzler 56f4035898 evas - proxy source visible check not done on update del
this fixes T842
2014-02-13 15:40:29 +09:00
Daniel Juyung Seo 4b457c5f2d evas_render: avoid unnecessary assignment. 2014-01-28 01:54:49 +09:00
Jean-Philippe Andre 981bdc16f6 Evas: Fix proxy rendering for animated objects
An invalid optimization was implemented in proxy rendering.
We can't assume a proxy is a smart object.

Refer to 5cefa00d0a.

Fixes T832.

Proxy rendering is still broken when using cserve2... :(
2014-01-22 17:02:27 +09:00
ChunEon Park a76e751eb4 evas - fixed side effect caused by f4d24e962d
since the map_changed is reset right after the map is updated,
it could not decide to redraw the map surface properly.

now map_update() returns the value to redraw the map surface properly.
2014-01-06 13:54:58 +09:00
Carsten Haitzler cb841b56af evas render2 - more work on basics 2013-12-20 19:45:44 +09:00
Viacheslav Lvov 067cbf6df8 evas - render - clear out pending object array more aggressively
There was detected that pending_objects array of Evas structure of
email application stores at least 550 objects that never are removed
from this array. These objects are not active and are not about to render.
We know that once the decision not to remove changed objects from this
array was accepted. But then the criterion of leaving object in this
array was weakened.
We propose to weaken this criterion more sufficiently – do not store
in this array objects that can not be cause of whole canvas
invalidation. Our exact proposal for this criterion you can see in the
patch attached to this issue.

NOTE: This patch is a try, there may be some side effect especially with
mapped object that we didn't find, so it could be reverted if before the
release of 1.9 we see anything wrong.

Reviewers: cedric

CC: cedric, seoz

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-20 14:43:23 +09:00
Carsten Haitzler eed4526003 first steps to rewriting evas render... a long path. 2013-12-19 22:49:43 +09:00
ChunEon Park 3c58b3ebeb Revert "evas/render - make sure render pre in proxy rendering."
This reverts commit b113f555e0.

found side effect... revert this code until fix them.
2013-12-08 03:14:14 +09:00
ChunEon Park b113f555e0 evas/render - make sure render pre in proxy rendering.
if the some of children are the mapped object in source object tree as well as the the mappped object is invisible,
then they wont be render_pre() called.

this make sure those render_pre() in proxy rendering.
2013-12-08 02:40:35 +09:00
Cedric Bail f90803aa2f evas: bugfix in evas_render of not maintaining changed flags on object correctly.
This bug is particularly visible in EFM video preview ( T 539 ). The problem is
that the logic for changed has evolved over time. At the beginning Evas canvas
was flat and could be handle in an array. It was then not using the changed flag
that much. This day, we are living with a tree and we need to propagate the
changed flag to the parent, so that when we walk them we only need to walk the
active objects and don't spend our time on branch that are completely static.

Sadly things did collide here. We remove all object that have been rendered
from the pending_objects array. That does include any smart object that was
processed even if one of the child was not. Once any of the child of that not
processed object is marked changed, it will be propagated up to the first
parent that is changed. As the parent of that one are marked as not changed
when evas_render walk the tree, he is blocked really early in the process and
never get a chance to detect that the child of a not changed object did change
and tada !

The fix is to add all the parent of all the object that are in the pending_objects
array back into the pending_objects list. So they will always be marked as changed.
Another alternative to this logic would have been to change pending_change to
filter out those and keep them around. I choose the first solution as I think it
will be more robust to catch all the parent in all case.
2013-12-03 16:43:58 +09:00
Carsten Haitzler 2512eaf157 evas event freezing is "wrong" for core events - turn it off
this turns off event freezing for SOME event types for eveas canvas
events (was was intended to begin with). this fixes T577
2013-12-01 13:26:04 +09:00
Daniel Juyung Seo 2ebd985b31 evas evas_render: removed unnecessary semicolon from a macro.
This fixes coverity CID 1132631.
2013-11-27 02:02:41 +09:00
ChunEon Park 58dfb4824f evas - stop over redraw of map content with smart object.
clip object would always stay in a changed state. nobody was walking them to reset.
Now we do reset there state as soon as we do render them.
2013-11-26 13:05:05 +09:00
ChunEon Park 39599d1a26 evas - code refactoring.
merge duplicated(almost) functions to one.
2013-11-25 16:06:03 +09:00
ChunEon Park 59cb177b4b evas - fix proxy render to update the proxies recursively.
If a proxy has proxies, all the chained proxies should be updated recursively.
2013-11-25 10:09:34 +09:00
ChunEon Park 5cefa00d0a evas/render - optimize proxy rendering.
redraw proxy if the source is smart object and it's changed visually.
2013-11-18 16:12:30 +09:00
Carsten Haitzler c4f54e23e6 fix framespace handling in evas _render to not cause in/out events...
but this is not finished. this needs proper fixing. this is a quick
patch for just the worst. the real solution is discussed here:

https://phab.enlightenment.org/T457
2013-11-02 13:50:13 +09:00
ChunEon Park 69077d19d7 evas/proxy - decide the proxy updation in the main render process.
because the proxy updation is decided in the proxy rendering time,

it couldn't be updated at the time if the source is changed before.
2013-10-31 17:04:23 +09:00
Jean-Philippe Andre d76e869a59 evas/cserve2: Fallback to normal cache for mmap
cserve2 can't handle virtual files (mmap-only), by design.
Proper support can be added later on, but for now we might want
to just fallback to the normal cache functions.

Fixes photocam test
2013-10-28 15:47:15 +09:00
Ulisses Furquim 3d3f33f310 evas: change sync all canvases function name.
Change evas_render_sync() to evas_all_sync() to better describe what it does
and avoid confusions with evas_render() and friends.
2013-10-18 14:43:08 -03:00
Rafael Antognolli 9506fd5db7 evas/image: Add video surface caps.
Wayland subsurfaces can be used as video surfaces too, similarly to
Ecore_X windows. However, they support a different set of features. Some
of them, like subsurface clipping and scaling, might be added in the
future, but so far we must work with what we have.

This commit allows to set an enum bitfield to the Video_Surface, with
the default value being one that will keep the same behavior as before,
for Ecore_X window. Thus, backward compatibility should not be broken.

It's possible to inform Evas that the surface in question is not able to
resize or scale, or that it's above or below the original canvas
surface. This allows Evas to show the surface itself, or use a buffer of
pixels instead, when the capabilities are not available.
2013-10-04 18:28:51 -03:00
Rafael Antognolli d1c6266c45 evas/image: Delay some video overlay operations.
If we are running on async render, some operations must be delayed, so
they will happen at the same time that the canvas rendering result gets
updated on the window/surface.
2013-10-04 18:26:57 -03:00
Mike Blumenkrantz 21daab2c62 evas render bug--
objects that were visible and marked as "render del" rects during render are now detected when they magically change visibility during the same render loop, fixing a very hard to reproduce E19 corner case related to fullscreen client rendering with nocomp disabled

<raster> for now all i can say is "put the patch in and lets see if things break"
2013-09-24 11:34:21 +01:00
Chris Michael d673cbc398 Readd the master clip for rendering of wayland engines.
NB: Master clip is needed so that things don't draw outside the client
area.

NB: This is a partial fix. Still a work in progress. Some remaining
issues with some various elm_tests that use evas_map.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-11 14:10:27 +01:00
Carsten Haitzler 3f94953509 evas - fix render op reset when drawing map objs :) 2013-09-05 20:31:17 +09:00
Carsten Haitzler 441f10e3ab evas - in dump also ensure an idle flush logic and proxy surface dump happens 2013-09-04 11:42:08 +09:00
Ulisses Furquim 0af10ae93f evas/render: improve evas_render_sync()
Tracking only the async rendering canvases and just waiting for the last one
to finish rendering. This should be enough to sync all canvases since the
render thread orderly executes the commands.
2013-09-03 01:52:38 -03:00
Cedric Bail 9ac13e4aec Revert "evas/render - this is insane to me since nowhere it release the render_pre_done FALSE pairly."
This reverts commit fd7d1f9f98.

This commit is the one breaking Evas_Map use in shelf. Let's investigate why it was disable
in the first place.
2013-09-03 12:39:49 +09:00
Ulisses Furquim 0c83dd806a evas/render: sync all canvases in _render_dump() 2013-09-02 20:03:23 -03:00
Ulisses Furquim 063f076aed evas/async_render: remove block/unblock of render thread.
This reverts commit 42a46214c4.
2013-09-02 20:01:37 -03:00
Ulisses Furquim 31b1cc6e3e evas/render: introduce evas_render_sync().
evas_render_sync() will loop through all canvases and wait for their
rendering to finish. Since this function will execute from the main
thread that will sync all of them.
2013-09-02 19:41:32 -03:00
Carsten Haitzler 08e430b18a move render wait before the block to avoid deadlock. 2013-08-30 09:09:08 +09:00
Carsten Haitzler 42a46214c4 other async render issue - sync ALL rendering canvases, not just one 2013-08-29 21:18:04 +09:00
Carsten Haitzler 175335ae08 evas - restore ability for evas_render_dump() to dump out referenced data 2013-08-28 16:44:31 +09:00
Chris Michael eff087a4b3 Fix redraw rectangle when framespace changes to not be Outside viewport.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-23 08:39:03 +01:00
Chris Michael 865531a9e1 Fix compiler warning about missing braces.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-19 08:35:34 +01:00
Mike Blumenkrantz c31061b642 evas render debug now prints object names if they exist 2013-08-19 05:20:57 +01:00
ChunEon Park 75ccce5706 evas - removed redundant code.
This check is not necessary but causes incorrect clipping issues.

At this moment, if primitive objects (except image) is the source then that code may be helpful but it doesn't guarantee same behavior for all the primitive objects.

So, right now removed it.
2013-08-18 16:26:11 +09:00
Cedric Bail f302c0e0ac evas: fix build with debugging rendering trace. 2013-08-06 15:45:07 +09:00
ChunEon Park e2c395f049 evas/proxy - render the children of the proxy's source object when ther visibility is true.
This is not the perfect solution at this moment. This doesn't consider the cached clipper's visibility at all.
But at least this would be better than exist works. Should be improved.
2013-07-28 20:24:46 +09:00
Cedric Bail 48b40640b5 evas: no need to call eo_data_scope_get in many case after this change.
Reduce CPU usage by 5% in some case (especially when the CPU is not the
limiting factor like with the GL backend).
2013-07-09 09:48:09 +09:00
ChunEon Park 64f984bd1a evas/render - draw the map in case that the source clip is invalid. 2013-07-05 12:53:09 +09:00
ChunEon Park 307e2f823d evas/render - support proxy source clip for the mapped object. 2013-07-05 11:14:47 +09:00
ChunEon Park 04f87ab237 evas/render - refactoring. split off a bunch of internal logic to a seprate function. 2013-07-05 11:09:03 +09:00
ChunEon Park 5f4ae9abeb evas/render - refactoring about checking smart member changed.
move those code to the evas_object_smart.
2013-07-02 15:28:56 +09:00
ChunEon Park 44568ef01d efl/evas - removed duplicated lines and apply clipping only when clip values are available. 2013-06-25 21:56:28 +09:00
ChunEon Park ede5390258 efl/evas - +null check 2013-06-25 21:53:05 +09:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
ChunEon Park 11b43dad4b evas - fixed source clip. If the source object is a evas primitive object, then proxy won't clipped by proxy clipper itself. 2013-05-31 20:29:18 +09:00
ChunEon Park fd7d1f9f98 evas/render - this is insane to me since nowhere it release the render_pre_done FALSE pairly.
This causes the textblock layouting problem.

It should be checked when does it really render_pre() called.

If someone knows the reason of this, please ping me.
2013-05-30 14:50:47 +09:00
Chris Michael 6cdbca59d4 Fix proxy object check to compare against proper object.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-09 08:06:05 +01:00
ChunEon Park b10be8fb4c evas/render - Fixed proxy clipping if the source object is clipped by output area.
Before this patch, the proxy will be clipped if the source is clipped by output area even if the soure_clip is disabled,

Additionally, src_clip/src_event/src_visible options must be supported in edje.
2013-05-08 01:16:49 +09:00
ChunEon Park 6a6f827e20 evas/render - there was a my fault. proxy clip should be a default. 2013-05-06 22:18:08 +09:00
ChunEon Park 49e88118d5 evas/render - and you don't need to check change for the map render if the change is already determined. 2013-05-06 11:03:11 +09:00
ChunEon Park 95b0f469b6 evas/render - clean code. 2013-05-06 00:56:10 +09:00
ChunEon Park 3ba5135135 evas - update map smart members when really it needs to render. 2013-05-06 00:48:56 +09:00
Carsten Haitzler c8def7a756 SCREW YOU GIT!... here is my fix for jack daniels leak! 2013-05-02 16:48:43 +09:00
Carsten Haitzler f8c9a8d167 revert the revert... damn you git!
Revert "Revert "Efl: replace eo_data_get for objects data referencing.""

This reverts commit b64a2994b3.
2013-05-02 16:47:16 +09:00
Carsten Haitzler b64a2994b3 Revert "Efl: replace eo_data_get for objects data referencing."
This reverts commit 654a3f5f94.
2013-05-02 14:17:19 +09:00
Daniel Zaoui 654a3f5f94 Efl: replace eo_data_get for objects data referencing. 2013-05-01 10:37:08 +03:00
ChunEon Park 29ef0f71ba evas - fix the wrong compare. thanks JackDanielZ for spotting it. 2013-04-30 19:51:24 +09:00
Rafael Antognolli 59c37d1c7b evas/framespace: Add support for framespace offset rendering translation.
Instead of moving the objects by adding the framespace offset to them,
use this offset when rendering them. This way there's no change in the
object's geometry/position, it works correctly with map, and will be
automatically updated in case that the framespace values change (for
instance if one sets a window to borderless).

There are 2 main places where changes were needed:
 - output redraws, when they come from an object being changed, must be
   add the framespace offset to their damaged area;
 - checks to see if the object is inside a given rendering area, must
   also add this offset, since the object is actually being rendered on
   a different position;
2013-04-29 11:29:43 -03:00
ChunEon Park 2e699fbab9 evas - and apply proxy_src_clip only when object and proxy is same in render_mapped 2013-04-29 21:05:33 +09:00
ChunEon Park 9fc2835cf4 evas - add evas_object_image_source_clip_set()/get() 2013-04-29 15:30:37 +09:00
ChunEon Park 911790b236 evas - fixed logic fault in proxy clipping. 2013-04-26 20:05:46 +09:00
ChunEon Park 188c345b27 evas - For compatibility, Make proxy's source clip to be optional. Im checking partal code for zmike. 2013-04-26 17:19:50 +09:00
ChunEon Park 39a864d2f7 evas - fix the proxy object to not be clipped by source clipper 2013-04-26 14:45:41 +09:00
Rafael Antognolli d05c58ff2c evas/wayland: Remove framespace clipper.
This clipper caused several bugs already, and there are some bugs still
not fixed. Let's remove it and try to fix any remaining with some other
kind of solution that does not depend on adding or clipping objects
during the evas render phase, which causes unexpected behavior.
2013-04-23 18:52:35 -03:00
Rafael Antognolli e937f1f5a3 evas/wayland: Unclip objects from the framespace after rendering.
These objects should be clipped only during rendering, since keeping
them clipped after that allows for unexpected behavior on the
application side. For instance, an application could check if objects
have clippers before doing something to them, assuming that some objects
should have no clipper, but under wayland, after the first render
iteration, there will be no objects without a clipper.

This commit fixes this behavior by unclipping objects that had no
clipper prior to the render iteration.

Additionally, it fixes a bug where a maximized/fullscreen window could
have not all of its content rendered immediately. This was occuring
because some objects could be clipped to the framespace clipper, but
considered invisible in the beginning of the render phase, where they
are evaluated. They were considered invisible because the framespace
clipper object was not resized at that phase yet, and thus these objects
were being clipped out from the viewport.
2013-04-18 16:38:16 -03:00
ChunEon Park 4163b2f509 Evas: If an object goes to be hidden without replacing the cur/prev state info, the object context can be corrupted at the next show time. Now it replaces the cur/prev in that rare case. 2013-04-16 03:05:16 +09:00
Cedric Bail 36c3cf0733 evas: don't call eo_data_get when it is really not necessary. 2013-04-11 18:07:09 +09:00
Cedric Bail 7739267d8b evas: bounding box is only relevant to smart object. 2013-04-07 15:11:56 +09:00
Cedric Bail f1dfbc4e0e evas: remove one useless pointer (-30KB). 2013-04-07 14:00:10 +09:00
Cedric BAIL f5b01e32ac evas: stop over redraw of Evas_Map content with Smart Object.
Clip object would always stay in a changed state. Nobody was walking them
to reset. Now we do reset there state as soon as we do render them.
2013-04-05 15:19:48 +09:00
Daniel Juyung Seo 8027d5f5d7 evas_render.c: added EINA_UNUSED for unused parameter. 2013-04-02 22:00:55 +09:00
Cedric BAIL ad861e9eab evas: call Eina_Cow garbage collector on surface dump. 2013-04-01 18:39:50 +09:00
ChunEon Park 7751a996c8 evas/render - better efficient check. 2013-03-28 10:34:26 +09:00
Cedric BAIL d583d08814 evas: no need for a callback per async call.
Let's not multiply our callback infrastructure without any serious need. We
already have to many of them.
2013-03-26 11:59:27 +09:00
Cedric BAIL d1112534a1 evas: optionally propagate update rectangle on RENDER_POST. 2013-03-22 15:30:34 +09:00
Cedric BAIL d79a2efa39 evas: use Eina_Cow a lot more and we are closer to the memory size of 1.7. 2013-03-13 14:35:25 +09:00
Raphael Kubo da Costa b236ac69bd evas: Rename evas_font_zero_presure()
There's an obvious typo in the function name, so appease my OCD and
rename it.

Patch by: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>



SVN revision: 83604
2013-02-04 15:33:38 +00:00
Cedric BAIL 3070dfac2d efl: move Evas_Object map data to there own Eina_Cow pointer.
NOTE: Overall speedup of 7%. No benchmark on memory consumption yet
as they are still running ask me directly to get the number later
today.


SVN revision: 83052
2013-01-22 03:56:00 +00:00
Cedric BAIL 3e7e37630f efl: group more map stuff in the same sub structure.
SVN revision: 83034
2013-01-21 09:36:19 +00:00
Cedric BAIL 380aea9e91 efl: cleanup Evas_Object_Protected_Data.
SVN revision: 83028
2013-01-21 03:51:58 +00:00
Cedric BAIL 5ae84c97ce efl: use new eina_cow macro to clean stuff a little.
SVN revision: 83026
2013-01-21 03:12:39 +00:00
Ulisses Furquim 34cc6a1b15 evas/async_render: fix refcount handling of scaled image entries
SVN revision: 82961
2013-01-17 22:14:05 +00:00
Leandro Pereira f52f44e7a2 evas_render: Measure time spent while rendering in sync and async modes
SVN revision: 82936
2013-01-17 14:31:34 +00:00
Carsten Haitzler 56a9ccefb5 a few spots missed for sync with async thread.
SVN revision: 82932
2013-01-17 11:10:27 +00:00
Cedric BAIL 4c828392da efl: roll in first use of Eina_Cow for Evas_Object.proxy.
Expedite biggest test memory win 100KB, average 10KB.
No slow down in proxy test (+/-3%). Speed up in most other
case (average speed up is +5%), likely due to much more
cache hit.

Elementary test show a win between 100KB to 600KB depending
on the test you are considering.

Now, you can see how I intend to use Eina_Cow and the expected
win we can have from it. I don't intend to do more for the
rest of the week so you have time to comment.


SVN revision: 82924
2013-01-17 07:21:06 +00:00
Ulisses Furquim d8b2bce148 evas/async_render: fix scalecache integration
Note: scalecache is really crazy stuff, we should rewrite it or get rid of it.



SVN revision: 82912
2013-01-16 22:32:39 +00:00
Paulo Alcantara b557bd9e0d efl/engines: Introduce multi_font_draw() function
This new engine function will only be used in software generic for
now - since it's the only engine used with the async render.

This function has been introduced in order to avoid growing thread
command queue too much to draw a text_props at a time on render calls
from textgrid objects.

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 82832
2013-01-15 17:35:11 +00:00
Ulisses Furquim 0f435b7eae evas/async_render: fixing mix of sync and async rendering
SVN revision: 82776
2013-01-14 20:02:43 +00:00
Ulisses Furquim d45a54a0aa evas/async_render: do not use async event to unref image maps
SVN revision: 82663
2013-01-11 19:56:17 +00:00
Leandro Pereira d5f91fd5c2 evas/async_render: do not use async event to unref glyphs
Patch by: Leandro Pereira <leandro@profusion.mobi>



SVN revision: 82662
2013-01-11 19:55:40 +00:00
Leandro Pereira ed79c2182e evas/async_render: do not use async event to unref images
Patch by: Leandro Pereira <leandro@profusion.mobi>



SVN revision: 82661
2013-01-11 19:54:12 +00:00
Gustavo Sverzut Barbieri 1e1751de47 evas: be loud if async render is mixed with sync.
SVN revision: 82655
2013-01-11 18:20:11 +00:00
Carsten Haitzler a8cc6e9e16 oosp - didnt meant o commit this... it was just the start of some test
code... not ready yet. just adds warnings and stuff.



SVN revision: 82381
2013-01-08 04:00:36 +00:00
Carsten Haitzler 478de3ec76 small change - not worth chglogging... make evas gl x11 header not
need xlib.h anymore... :)



SVN revision: 82378
2013-01-08 03:49:49 +00:00
Cedric BAIL f8ea554926 efl: limit regression with async rendering.
NOTE: There is still an issue with text rendering, that
is still 4 times slower and impact all text object (text,
textblock and textgrid).


SVN revision: 81912
2012-12-30 23:39:11 +00:00
Ulisses Furquim 5f493f2c38 evas/evas_render: use rendering flag only when async rendering
Also postpone marking the rendering flag until we know we will have
the draw thread do its work. This way we avoid waiting forever at
evas_render_rendering_wait() when the draw thread is also blocked.

Patch by: Ulisses Furquim <ulisses@profusion.mobi>



SVN revision: 81798
2012-12-28 13:00:37 +00:00
Mike McCormack 7b2b9da7cb efl: Remove unused label
Signed-off-by: Mike McCormack <mikem@atratus.org>

SVN revision: 81736
2012-12-27 08:58:40 +00:00
Paulo Alcantara 19a52f4efd efl/evas: Fix XCB/Xlib crash when closing applications
We need to wait draw threads finishing their stuff before freeing canvas.

Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>


SVN revision: 81395
2012-12-19 18:03:38 +00:00
Paulo Alcantara 76932dcc9f evas/engines: Introduce render mode
The render mode should be useful for engines other than software one.

Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>


SVN revision: 81384
2012-12-19 16:15:58 +00:00
Paulo Alcantara 6483c8d1e6 evas/render: Avoid race when sending render data and updates_cb
Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 81303
2012-12-18 20:20:45 +00:00
Leandro Pereira cb10c7d019 evas: Modify software_generic and gl_x11 to with with threaded renderer
SVN revision: 81284
2012-12-18 16:28:55 +00:00
Leandro Pereira a7b4a3c12d evas: Async render
SVN revision: 81282
2012-12-18 16:26:44 +00:00
Gustavo Sverzut Barbieri a332d1c869 efl/evas: remove mask of non-rectangle objects.
it was broken and mostly disabled, so now we do remove it in the hope
who does that next time, does it properly.



SVN revision: 80252
2012-12-05 13:52:59 +00:00
ChunEon Park f90641200b evas - fix the memory leak - eina_rectangles allocated for clip_changes.
SVN revision: 79469
2012-11-20 11:52:16 +00:00
Vincent Torri c15e9c6575 merge: and now Evas
I've tested make -j 3 install and it works nicely

I've tested expedite with software and opengl xlib,
and it works. Not tested other engines, so please
report any problems (engines or other) on the ML.

TODO: examples and tests, I'll add them later

ISSUE: Eina_Unicode size check. It indirectly depends on
       eina_config.h, which is created at the end of the
       configure script. So its size is always 0. I don't
       know how that size is used, so I can't do a lot,
       for now.


SVN revision: 78895
2012-11-04 11:51:42 +00:00