Commit Graph

235 Commits

Author SHA1 Message Date
Jean-Philippe Andre fd2c4b4a26 Evas image: Create interface Efl.Image.Animated
This interface groups all low-level animated image functions.

FIXME:
- Rename to Efl.Image.Animated once eolian is fixed
- Fix mess with emile enum (loop_hint)
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre 544ae716ed Efl.Image: Improve documentation a bit
This interface needs to be extended and cleaned up... this will
happen in the following patches.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre b5d87aef1c Efl.Gfx.View: Rename property size to view_size
size is an insanely generic name, so there would be clashes
in language bindings. Use eo_prefix.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre 2d10127524 Evas image: Move filled property to Efl.Gfx.Fill and set as default
The filled property should be set to true by default since it
makes more sense. Legacy APIs behaviour is preserved by setting
the default to false.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre e9508ea80e Efl.Gfx.Fill: Remove fill_spread
It's not actually implemented anywhere. There's a flag that's
never read. Proper support would require quite some work.

Once we actually implement fill_spread support, we can bring
the API back without breaking compatibility.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre b640cb5ba9 Evas filters: Simplify evas_filter_dirty
Objects can mark themselves as changed rather than having all this
duplicated code inside the mixin.
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 23a6b12183 Fix migration script mistakes and compilation warnings.
Mostly unused vars following the removal of eo_do_ret().
However, there are some cases where the migration script got some things
wrong, and I had to manually fix them.
2016-03-03 09:58:08 +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
Jean-Philippe Andre 24f19dc770 Efl.Gfx.Filter: Rework APIs and mark as stable
- Remove @beta flags,
- Update @since to match stabilization,
- Change methods to properties with keys,
- Use eo_prefix and add filter_ prefix to all properties since
  they use very generic names,

The filter API stays under Efl.Gfx since there are other kinds of
filters, and this one is the particular "graphical filter" or
"effect" API.

The EO API mostly not change from an application point of view,
except for "source_get" which now returns a string directly. Also,
state and data can now be queried.
2016-03-02 12:57:23 +09:00
Jean-Philippe Andre 17e3f8c1a6 Evas Filter: Use Eo.Base.constructor in the mixin
This is made possible by inheriting first from an interface
instead of Eo.Base, thus implementing the Eo.Base interface.
2016-02-26 18:36:23 +09:00
Jean-Philippe Andre c2522dd736 Evas filter: Rename constructor/destructor to ctor/dtor
This avoids a name clash with Eo.Base.
2016-01-13 18:51:20 +09:00
Jean-Philippe Andre 22324f21b3 EFL: Mark EOLIAN functions as static when possible
This affects mostly evas filters.
2016-01-13 15:34:20 +09:00
Jean-Philippe Andre 2ac9e788c6 Evas: Implement ARGY88 and GRY8 conversion to ARGB8888
This is adding support for a deprecated function, but apparently
it is used.

Also, remove crazy abort() inside the data_put function.

Fixes T2991
2015-12-29 22:05:50 +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 8937fd4fc9 Evas render: Fix rendering of snapshot objects
I added a quick check that the clip was not 0x0 but forgot
to check that we actually use the clip info.

Fixes T2792
2015-10-23 16:30:37 +09:00
Jean-Philippe Andre c22fa8a96a Evas: Some coverity fixes
This are false alarms. But the explicit null check doesn't hurt.
Also, Coverity doesn't like eo_do_ret. Neither do I. :)

- CID 1327246
- CID 1327245
2015-10-14 11:27:47 +09:00
Jean-Philippe Andre cfedba598c Evas render: Fix proxy source_clip with source images
In case the source is an Evas_Image, we skip proxy_subrender,
and so the clip was not set against the source clip.
2015-10-14 11:14:36 +09:00
Jean-Philippe Andre dc397fabff Evas filters: Fix some build warnings
Thanks Tom for spotting one of those
2015-10-12 13:44:44 +09:00
Jean-Philippe Andre 62940b41f2 Evas filter: Fix proxies of filtered images
@fix
2015-10-12 13:40:20 +09:00
Jean-Philippe Andre 512fb7f193 Evas snapshot: Fix proxies of snapshot objects
This was broken because the wrong image size was used
in the proxy's fast path (proxy of another image).
Why did snapshot use a specific surface_w,h instead of
reusing the usual cur->image.w,h? (@cedric)

Simplify code.
2015-10-12 13:40:20 +09:00
Dongyeon Kim c92e670143 Evas image: Fix wrong usage of engine data macro
ENDT macro should be passed to engine functions instead of
some other function pointer!
@fix
2015-10-06 14:55:20 +09:00
Jean-Philippe Andre b38f8a3f39 Evas GL: Fix render: force pixel_get if dirty
All examples and docs point to using only the dirty flag in
order to trigger a redraw of an Evas GL surface. The commit
21c4352823 broke this behaviour (for a good reason, but not
related to Evas GL).

This is a compatibility fix.
2015-10-02 17:11:35 +09:00
Jean-Philippe Andre 2317bb83fc Evas image: Simplify updates if adding whole region at once 2015-10-02 16:56:38 +09:00
Jean-Philippe Andre 52e4bbda7b Evas filters: Fix handling of FILL for image filters
Note: Image filters still need a LOT of work to be usable.
2015-10-01 20:10:54 +09:00
Carsten Haitzler 21c4352823 evas image object - dont update just if image is dirty
marking images as dirty is only meant to have the pixle get callback
called IF rendered. you ADD update regions to get it to be called.
this is how it has always meant to work, but evas image objects where
adding updates just if dirty. this ends up with e as a compositor
redrawing ENTIRE eindows if even a single blinking cursor is blinking.
oh so bad.

@fix
2015-09-25 14:31:28 +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
Carsten Haitzler 31b07f94b7 evas - fix whitespace in code 2015-09-21 14:31:00 +09:00
Nak-Gyeong Kim 712db856a2 evas: fix memory leak in evas_object_image_render_pre.
Summary:
Eina_Rectangles are removed from pixel_updates list without eina_rectangle_free during render pre stage.

@fix

Test Plan: check memory leak.

Reviewers: cedric, jypark

Subscribers: jypark, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-09 01:08:49 +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 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
Jean-Philippe Andre fcde390fa4 Evas GL: Add missing call in case of direct rendering
I spotted this by looking at the code in a different branch (that
was tested on real hardware).
2015-07-23 10:34:15 +09:00
Daniel Kolesa c4d666805d evas: fix missing render2_walk initializers
This caused annoying compiler warnings that are gone now.

@fix
2015-07-21 13:54:23 +01:00
Daniel Kolesa 3e72080123 evas_object_image: fix wrong type assignment warning 2015-07-15 16:06:32 +01:00
Jean-Philippe Andre 45cef3e0a5 Evas.Image: Fix legacy EAPI name
Thanks @kuuko for the report. Sorry for the breakage of Python apps.
2015-07-06 14:24:05 +09:00
Jean-Philippe Andre 225b33451b Evas.Image: Simplify logic (trivial change) 2015-07-02 15:47:25 +09:00
Jean-Philippe Andre 32dc8f092c Evas.Image: Deprecate some functions and remove from Eo
This patch deprecates the following functions:
- evas_object_image_data_convert
- evas_object_image_pixels_import
- evas_object_image_reload

I could not find any place where they are used.

The old documentation is kept in the header, but not as a doxygen
anymore.
2015-07-02 14:32:07 +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
Jean-Philippe Andre f4f808f25d Evas image: Remove useless piece of code
Not only is it useless, it is very likely to make the function call
fail (data_get is quite likely to fail with GL).
2015-07-01 20:46:34 +09:00
Jean-Philippe Andre 161822418a Evas: Make Evas.Image.save() work with all images
This includes proxies, 3d scenes and normal images.
There is still a problem as the GL engine returns NULL on
data_get.

This kinda goes against the EO API declaration as
eo_obj is used as a mutable argument, but internal data was
already modified before this patch.

TODO: Draw maps, filters, etc... in a dedicated surface to save
      them as they truly are (ie. filtered images).
2015-07-01 20:45:04 +09:00
jiin.moon 739eb4bd0d evas: opaque value does not change even if image data be changed
Summary:
opaque value keeps previous image's value
when image data be changed by file_set/mmap_set api

@fix

Test Plan:
1) Make a evas rectangle object has color
2) Make a evas image object with jpg file.
3) Replace image data with png file by evas_object_image_file_set.

Reviewers: Hermet, cedric, jypark

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-29 14:56:23 +02: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 c86a5edc9f Evas filters: Add @protected tag where applicable
The Evas.Filter interface is basically just an internal thing.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre f4825006b0 Evas filters: Remove overrides of methods from Evas.Filter
Welp that was stupid to add them in the first place...
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 29402b2ce9 Evas filters: Complete support for image filtering
Reusing the new EO mixin, complete the support for image
filtering. This now adds support for edje state inside
the image filter.
2015-06-25 14:36:09 +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 1b2819f2cb Evas filters: Implement __index for Lua buffer objects 2015-06-25 14:36:08 +09:00