Commit Graph

213 Commits

Author SHA1 Message Date
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
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
Daniel Hirt ed01a32c13 evas: move evas_object_inject to super's ctor
Summary:
As we always call evas_object_inject in every Evas Object's ctcor,
it seems sensible to move this repeated bit of code to the super
(Evas.Object).

Test Plan: Expedite, Elementary_Test and pretty much everything

Reviewers: cedric, raster

Subscribers: JackDanielZ, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-11 09:58:13 +02:00
Mike Blumenkrantz 29cf9abfc6 evas: make image_size_get() return the actual image size
proxy/3d/etc images would previously return 0x0, breaking size calcs

@fix

@jpeg
2015-05-27 22:16:22 -04:00
Carsten Haitzler cc49c1702b evas - fix yuv support to no longer ignore 709 colorspace params
if yuou use 709 instead of 601 yuv (ycbcr) evas will just be wrong and
use 601. this fixes that and implements 709. it also fixes a scaling
bug for yuv in the gl engine. no one noticed but me, so i won't call
this a bug fix, and it can go into the next efl release - no need to
backport unless it actually bothers peolpe (which it seemingly doesn't)
2015-05-27 20:19:46 +09:00
Tom Hacohen 92fb2917cb Eo: Remove eo_error_set() and clean up finalizer()
This is another cleanup in perparation for the Eo stable release.
This is no longer needed thanks to the proper error reporting with
eo_constructor()'s new return value.

The finalizer change cleans it up a bit so it catches more cases/issues.
This also means that the finalizer cleans up the object in all cases,
and not only some.

@feature.
2015-05-20 16:25:38 +01:00
Tom Hacohen 6efbfe227a Eo: Add a return value to eo_constructor().
From now on, constructors should return a value, usually the object
being worked on, or NULL (if the constructor failed). This can also
be used for implementing singletons, by just always returning the same
object from the constructor.

This is one of the final steps towards stabilizing Eo.

@feature
2015-05-20 13:03:24 +01: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
Jean-Philippe Andre 796a0d7d34 Evas GL: Fallback to indirect rendering if mul_col != 0xFFFFFFFF
@fix
2015-04-14 21:19:13 +09:00
Jean-Philippe Andre 0a19a87c0e Evas image: Return proper path even with mmap
Since we're using a union (u.{f,file} we can't just
return u.file when the file was set as an mmap source.

@fix
2015-04-10 16:47:12 +09:00
Cedric BAIL a395f5ded5 efl: add Efl.Gfx.View and use it in Evas.Image. 2015-04-03 16:23:26 +02:00
Cedric BAIL 7ba7ed4a1c efl: add Efl.Gfx.Fill and migrate Evas.Image to it. 2015-04-03 16:23:24 +02:00
Cedric BAIL c2e75544e1 efl: move mmap API to be part of Efl_File class. 2015-04-03 16:23:13 +02:00
Jean-Philippe Andre bea9567d0e Evas GL: Kill runtime warnings caused by auto fallback
The previous commit modifies the concept of direct rendering
vs. indirect rendering, so some runtime checks (in debug mode
only) will fail.

This commit introduces two new engine functions:
 - gl_get_pixels_pre
 - gl_get_pixels_post

The latter will be used in a later patch for optimization.
2015-03-03 20:08:16 +09:00
Jean-Philippe Andre a14492ef73 Evas GL: Automatic fallback to indirect rendering when the scene has
not changed.

Automatically fallback to indirect rendering on FBO or X11 Pixmap
if the Evas Object Image is not marked as dirty. This should
improve the performance and/or power consumption in those
rare cases where this area of the canvas needs to be redrawn
but the GL content has not changed.

@feature
2015-03-03 18:11:32 +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
Jean-Philippe Andre 93d167ac87 Evas GL: Add hidden config values for direct rendering options
Those 2 new values are here to avoid using environment variables
that have side effects on the whole application.

I'm actually wondering if we shouldn't just kill off the env
vars altogether. Also, direct override is a terrible option that
should never be used.
Memory optimization can make sense (needs more testing tho).
2015-02-24 22:12:00 +09:00
Tom Hacohen 648ad2591c Fix code to conform to recent Eo changes. 2015-02-23 17:16:02 +00:00
Carsten Haitzler d3527da0ab evas - image obj - filled mode - never use invalid 0x0 fill
this fixes a lot of noise for filled image objects that set fill to
0x0 if objetc is 0x0. this clamps minimum fill at 1x1 and thus keeps
things silent and sensible. also just silently ignore 0x0 filled image
objects. noise is not that useful.
2015-02-12 22:30:10 +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
kabeer khan 46b9b23144 evas: add image orient set/get API in software backend for now.
Summary:
Added API's to rotate(0, 90, 180, 270), flip(horizontal, vertical, transpose, transverse)
evas image object. Also added example to demonstrate this.

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: raster, stephenmhouston, cedric

Subscribers: stephenmhouston, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 17:30:54 +01:00