Commit Graph

936 Commits

Author SHA1 Message Date
Jean-Philippe Andre 24f38eaf6d Evas gl: Replace all remaining references to mask stuff by alpha
Masking is not used (there even was a recent commit by Hermet to
remove most of the occurences of mask shaders in GL), and I've
introduced a new ETC1+Alpha feature. Replace the old texm and
associated variables by texa for alpha texures.
2014-07-11 12:20:07 +09:00
Cedric BAIL 255ceb419c evas: gl_common already provide the infrastruture to manipulate ImageSEC. 2014-07-10 11:34:34 +02:00
Chris Michael d7b7f19e5e evas-engine-wayland-shm: Check for depth being INHERIT on reconfigure
Software Generic backend can send us OUTBUF_DEPTH_INHERIT during a
reconfigure. If we are inheriting the previous depth, let's check that
so we don't get needless destrouction/recreation of shm buffers.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 12:57:17 -04:00
Chris Michael d5443ffbce evas-engine-drm: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 11:39:46 -04:00
Chris Michael a20a12bfbc evas-engine-drm: Fix evas drm engine bufer depth
Seems the new software_generic backend is passing in
OUTBUF_DEPTH_INHERIT during a reconfigure, so let's add a check for
that else if not, the entire drm engine stops rendering due to output
buffers not being created to match the framebuffer depth.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 11:39:46 -04:00
Chris Michael 89d4384b14 evas-engine-drm: Fix update of output buffer size
Adjust the ob->w/h dimensions After the framebuffer has been setup
because we cannot have output buffers smaller than the framebuffer

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 11:17:21 -04:00
Chris Michael 4f8b8cd398 evas-engine-drm: Fix software_generic_update to use the correct size.
We cannot use epd->output.w/h in these calls as the setup of the
output buffer May cause a resize. Drm buffers cannot be allocated
Smaller than the framebuffer size, so evas_drm_outbuf_setup function
May resize the ob->w/h to match the framebuffer.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 11:15:39 -04:00
Cedric BAIL 8d53f4ca3b evas: correct multi buffer support. 2014-07-09 16:14:57 +02:00
Cedric BAIL 68110c63b6 evas: actually put the specific code in the right place. 2014-07-09 15:17:03 +02:00
Jean-Philippe Andre c65918eaed Evas gl: Add errors when using ETC1+Alpha as a normal texture 2014-07-09 14:01:11 +09:00
Jean-Philippe Andre ec9ffd0ae8 Evas gl: Fix invalid number of atlasses
Left-over from a local experiment where ETC1+Alpha had its own
texture pool. Not required.
2014-07-09 12:39:18 +09:00
Jean-Philippe Andre c7d290b447 Evas gl: Remove non-existent filters from compile.sh 2014-07-09 10:40:25 +09:00
Jean-Philippe Andre 698f7f1770 Evas gl: Don't use glCompressedTexSubImage2D for ETC1
Eeeeh. Not only we don't support atlasses with this RGB+A thing
yet, but ETC1 does not even support SubImage2D (according to the
current spec).

Also, fix a few typos in that same function.
2014-07-09 10:18:34 +09:00
Jean-Philippe Andre cb0eef29c8 Evas gl: Fix potential memleak
Fixes CID 1224765.
This CID reports a potential memleak in an "assert" situation.
2014-07-09 09:41:40 +09:00
Jean-Philippe Andre c0b7957d17 Evas gl: Simplify cspace matching for textures
Some colorspaces (ETC, S3TC, GRY, ...) don't care about the value
of BGRA support or the alpha flag. So, let's introduce the
new boolean^Wenum value MATCH_ANY ;)

Note: the compressed texture formats with alpha support have been
marked as matching both TRUE and FALSE for alpha. The images
should always have the alpha flag set to TRUE, though.
The BGRA flag really doesn't matter.
2014-07-09 09:05:37 +09:00
Jean-Philippe Andre 6deda1a722 Evas TGV: Fix compilation with BUILD_NEON
The TGV loader is an Evas_Loader, not part of evas itself
(eg. in cserve), so we can't use evas functions from there.
eina_cpu provides appropriate CPU features detection.
2014-07-09 09:04:55 +09:00
Jean-Philippe Andre 48bcf182b4 Evas gl: Add support for ETC1+Alpha textures
Compile-in the required shaders, add support for the
new EVAS_COLORSPACE_ETC1_ALPHA, and upload textures as RGB+A
pairs.

@feature
2014-07-09 09:04:55 +09:00
Jean-Philippe Andre 0bba7422cb Evas TGV: Add support for ETC1+Alpha
Save images with alpha in two planes:
- RGB data as ETC1
- Alpha as ETC1 (from a greyscale image)

The second plane alpha is located right after the RGB plane.

The RGBA data is not premultiplied, so that RGB can be encoded
at a better quality in ETC1. This should avoid some blockiness
artifacts that we can see in the current ETC2 mode (which supports
alpha natively). Eventually ETC2 should also support non
premultiplied data for a better encoding quality.

This patch implements the saver and the loader.

@feature
2014-07-09 09:04:55 +09:00
Jean-Philippe Andre 224506171f Evas gl: Add shaders for RGB+Alpha mode
These shaders take two textures as input and sample RGB from
texture 1 and alpha from texture 2. This is the non-premultiplied
version, so RGB' = RGB*A.

This includes only the GLSL code.
2014-07-09 09:04:55 +09:00
Jean-Philippe Andre 23e60bd6ff Evas gl: Fix path resolution in compile.sh
Let's make compile.sh work from anywhere (not just from its
containing directory). Also fix problem with calling make-c-str.sh
without setting PATH.
2014-07-09 09:04:55 +09:00
Chris Michael d929151458 evas-engine-drm: Fix invalid variable check
We need to check if evas_outbuf_setup Failed and did not return a new
ob for us to work with...so this if check was invalid

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-08 14:43:29 -04:00
Chris Michael 8534fe1179 evas-engine-drm: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-08 14:43:21 -04:00
Chris Michael 69bac9d701 evas-engine-drm: Fix drm engine breakage from Frenchie
We need to have the drm fd & tty setup Prior to creating the output
buffer so that the output buffer knows what drm card to use

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-08 12:20:42 -04:00
Chris Michael ea8ffdf433 Revert "evas/drm: Make use of ecore_drm for opening DRM device"
This reverts commit 31ad73efa9.

Conflicts:
	src/modules/evas/engines/drm/evas_engine.c

Revert this commit as these functions are needed to run evas engine
standalone (expedite) on drm
2014-07-08 12:09:31 -04:00
Chris Michael e2ad7a18f9 Revert "evas/drm: Remove obsolete tty open function"
This reverts commit 1db13194a2.

Revert this commit as this is needed to run the evas engine in
standalone situations like expedite.
2014-07-08 12:09:23 -04:00
Cedric BAIL 5bf4ae22cb evas: fix bogus update rect, that's what I call black magic. 2014-07-08 14:27:08 +02:00
Cedric BAIL 1b14531146 evas: fix use of already freed data use. 2014-07-08 11:00:23 +02:00
Dmytro Dadyka 8e496570a7 evas: Evas_3D - add fog effect. add two API function for enable and disable fog effect for given mesh.
Reviewers: Hermet, raster, cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-07 19:26:48 +02:00
Cedric BAIL e85bcfafa4 evas: fix wayland_shm to report buffer state as expected by software generic backend. 2014-07-07 18:27:32 +02:00
ChunEon Park b3d11fae4c evas/gl - removed MASK ramains. 2014-07-07 17:08:22 +09:00
Gwanglim Lee e3192c374d evas: gl_x11 - add missing function pointer glsym_eglSwapBuffersWithDamage
Summary: added missing global function pointer to gl_x11

Test Plan: N/A

Reviewers: cedric, raster, devilhorns

CC: cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-06 20:19:34 +02:00
Wonguk Jeong 1cc23d4ff2 evas: jpeg loader - support flip, transpose, transverse
Summary:
Previously, jpeg image loader support rotation (90°, 180°, 270°) only.
this patch is about supporting flip(vertical, horizontal), transpose, transverse

@feature

Test Plan: I'm going to make tests in src/tests

Reviewers: cedric, raster, jpeg

CC: seoz, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-06 20:12:31 +02:00
Chris Michael 0168b96040 evas-software-generic: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-06 12:36:46 -04:00
Cedric BAIL 235caec745 evas: remove multiple definition of glsym_eglSwapBuffersWithDamage. 2014-07-06 18:18:29 +02:00
Cedric BAIL 6d7df3cc90 evas: fix warning due to change in software generic backend. 2014-07-06 18:16:45 +02:00
Cedric BAIL f1590e06b0 evas: fix build break with GLES. 2014-07-06 18:16:10 +02:00
Cedric BAIL 87bcb1da23 evas: missing shared declaration. 2014-07-05 21:03:36 +02:00
Cedric BAIL 410a2a7953 evas: missed replacement. 2014-07-05 13:13:43 +02:00
Cedric BAIL 914b529e38 evas: make partial update extention compile for every one in gl_x11 backend. 2014-07-05 12:50:56 +02:00
Cedric BAIL 380115c025 evas: update Windows backend to use the software generic interface. 2014-07-04 16:07:52 +02:00
Cedric BAIL 14d22c5a08 evas: migrate GL_X11 to use more infrastructure of software_generic. 2014-07-04 15:11:22 +02:00
Cedric BAIL 289b3691b0 evas: add more infrastructure to software_generic backend to be ready for GL_X11 migration. 2014-07-04 15:11:22 +02:00
Cedric BAIL 4be4991315 evas: rename Evas_GL_X11_Window to Outbuf. 2014-07-04 15:11:22 +02:00
Cedric BAIL ab6dd99ed8 evas: add support for merging redraw area across multiple frame with different logic. 2014-07-04 15:11:22 +02:00
Cedric BAIL 35648c09be evas: remove unused include that can lead to problematic include on some platform. 2014-07-04 15:11:22 +02:00
Cedric BAIL c4aa53bef0 evas: make DDraw backend use more software generic. 2014-07-04 15:11:22 +02:00
Cedric BAIL 38117f9a25 evas: Make GDI backend use more software generic infrastructure. 2014-07-04 15:11:22 +02:00
Cedric BAIL 0fdf8fab3a evas: simplify Wayland_SHM backend to use software generic infrastructure. 2014-07-04 15:11:22 +02:00
Cedric BAIL e4a4304dc4 evas: simplify DRM backend to use Software generic infrastructure more. 2014-07-04 15:11:22 +02:00
ChunEon Park dad74f7455 evas/gl - removed redundant shader masking code. 2014-07-04 21:10:20 +09:00
Carsten Haitzler 1eaf26989b evas - gl common - fix drop of image on cache hit in gl engine images
@fix - this fixes a leak (reference count leak)
2014-07-04 12:26:16 +09:00
Jean-Philippe Andre b0df307927 Evas gl: Add support for S3TC textures
Add support for DXT1, DXT3 and DXT5 textures (4 formats in total).

@feature Add support for S3TC textures if the GPU supports them
2014-07-03 15:36:22 +09:00
Jean-Philippe Andre 81929e3404 Evas: Complete DDS loader with direct S3TC data load
This requires block flip (could be repeat, but flip is just as fast).
2014-07-03 11:37:48 +09:00
Jean-Philippe Andre 79ed3c4516 Evas DDS: Implement support for DXT4 and DXT5 2014-07-03 11:37:48 +09:00
Jean-Philippe Andre d9d0ff2088 Evas DDS: Implement decoding of DXT2 and DXT3 2014-07-03 11:37:48 +09:00
Jean-Philippe Andre 18e969f644 Evas DDS: Implement DXT1 to RGBA decoding 2014-07-03 11:37:48 +09:00
Jean-Philippe Andre 8c8a4d37f9 Evas DDS: Start implementing DDS file loader
This implement the header read.
2014-07-03 11:37:48 +09:00
Jean-Philippe Andre c424153867 Evas: Add DDS image file loader
@feature: Add a Micrsoft DirectDraw Surface file loader
2014-07-03 11:37:48 +09:00
Jean-Philippe Andre 644de1f93f Evas gl: Remove hack around CompressedTexImage2D
A compressed texture should be created with glCompressedTexImage2D
only, and not with glTexImage2D (This returns GL_INVALID_VALUE).
2014-07-03 11:37:48 +09:00
Jean-Philippe Andre b0f353cc38 Evas gl: Fix texture allocation (missing Y offset)
I saw some GL error messages (with the GLERR() macro activated),
that were caused by GL_INVALID_VALUE.

For some (many) textures, tex->y was 0 but since we now use a 2D
atlas (rectangle allocator), the first row of pixels should be
repeated. This caused uploads to Y = tex->y - 1 = -1, which is
invalid.
2014-07-03 11:37:48 +09:00
Jean-Philippe Andre a2de0a0bc9 Evas: Support duplicated borders in surface alloc
Now, the evas loader is supposed to advertise the actual border
size in case of compressed texture formats.

The only case where the border was non zero was ETC formats,
from the TGV loader, so I think we don't need to keep the
previous behaviour (auto-calculate borders for ETC).
2014-07-03 11:37:48 +09:00
Jean-Philippe Andre 2b191b3c51 Evas loader: Introduce border param 2014-07-03 11:37:47 +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
Stefan Schmidt 1db13194a2 evas/drm: Remove obsolete tty open function
We use ecore_drm for this already. Remove this non-used version.
2014-06-30 10:13:43 +02:00
Stefan Schmidt 31ad73efa9 evas/drm: Make use of ecore_drm for opening DRM device
We use this functionality already from ecore_drm. The evas version does
not even use udev to acquire the device which means we could not support
hotplugging. The only missing feature was the capability check for
DUMB_BUFFER which I added to ecore_drm now.
2014-06-30 10:13:43 +02:00
wonguk.jeong 7754f3e87f evas: fix jpeg loader rotation by metadata (exif)
Summary:
90 or 270 degree rotation is not working properly
width should be regarded as height, and vice versa.

if this patch and D1082 were commited, rotation from metadata will be working properly by using evas_object_image_load_orientation_set()

@fix

Test Plan: add image object and invoke evas_object_image_load_orientation_set() -> load file with orientation metadata -> check whether image is rotated properly or not

Reviewers: raster, cedric, jpeg

CC: seoz, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-06-29 15:04:21 +02:00
wonguk.jeong 87b8339b81 jpeg loader: exif parsing bug fix
Summary:
problem: orientation information was not come out properly

byte align value was wrong. 0x4949 is II not MM

refer to http://www.media.mit.edu/pia/Research/deepview/exif.html

@fix

Reviewers: raster, cedric, jpeg

CC: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D1082
2014-06-29 13:10:16 +02:00
Cedric BAIL 201d9b567d windows: make those warning explicit about what they imply. 2014-06-27 17:00:23 +02:00
ChunEon Park 4cbc73ce1d evas/gl - ... removed white trailing. 2014-06-27 21:47:00 +09:00
ChunEon Park 7341887851 evas/gl: fix indentation. 2014-06-27 21:38:30 +09:00
ChunEon Park 5e18223f67 evas/gl: improve the rendering quality.
To avoid texture bleeding in the texture atlas,
we adjust texture uv point as much as a half uv point.
Especially, this improves the rendering quality when the image has the border
area.

Unless apply this patch,
You might find the rendering result is different with software backened,
if the image has the borders.

In the software backened,
the border line was clear but the gl wasn't.
because the border line was interpolated so the rendering result was not the one we expected.

@fix
2014-06-27 21:29:24 +09:00
Cedric BAIL c52e63ec87 evas: fix warning and remove useless code. 2014-06-27 13:49:59 +02:00
Cedric BAIL 760279f02e evas: read fullscreen flags from initialized value. 2014-06-27 13:47:44 +02:00
Cedric BAIL 40875064df evas: fix warning in DDraw backend. 2014-06-27 13:45:42 +02:00
Cedric BAIL dcf9cf6a7b evas: silent some warning during Windows backend build. 2014-06-27 13:45:06 +02:00
ChunEon Park 5ade5ca433 evas/png - better way to support png grayscale with transparency format.
suggested by cedric.
2014-06-26 17:00:37 +09:00
ChunEon Park d69e4fbe20 evas/gl - fix to render grayscale with transparency format in gl backened.
In case of png, grayscale with transparency format (transparency doesn't mean the png has alpha channel)
gl doesn't prepare that format render.
In this case, set it argb8888 to convert the data in the png loader.

@fix
2014-06-25 21:50:35 +09:00
ChunEon Park 836c0535f0 evas/gl: eeeek. i missed removing one unnecessary checking 2014-06-23 12:07:41 +09:00
ChunEon Park cca1c500d5 evas/gl: increase message level and avoid unnecessary checking
the checking is introduced previous my commit 5f52f5c9e5.
2014-06-23 12:02:31 +09:00
ChunEon Park 5f52f5c9e5 evas/gl: don't go forward if the format is not supported. 2014-06-23 10:07:39 +09:00
ChunEon Park 65cebb614c evas/gl: abort is so cruel. print error and let it don't die there. 2014-06-23 09:50:55 +09:00
Cedric BAIL 35f0cd2680 evas: fix crash when preloading Evas_Object_Image.
This was a left over from the Eina_Rectangle patch improvement from Rajeev,
thanks Chris for spotting it.
2014-06-19 22:40:50 +02:00
Rajeev Ranjan bd65b5db5d evas: improvement of Eina Rectangle Pool and integration with Evas GL backend.
Summary:
This patch introduce various new logic for packing/unpacking of Eina Rectangle in a pool.
It is then used by Evas GL backend texture allocation to improve how efficiently we pack
image in texture atlas. This lead to improved memory usage and reduced power consumption
with usually a more stable higher FPS (as it use less texture to do the same task, their
is less texture switch, so saving memory and speed at the same time).

This patch was developped on Cedric's suggestions to optimize the packing logic using Skyline
algorithm. This patch is based on master and is a new submission for earlier phab link
https://phab.enlightenment.org/D774.

Signed-off-by: Sanjay Nirankari <sanjay.n1@samsung.com>
Signed-off-by: Rajeev Ranjan <rajeev.r@samsung.com>
Signed-off-by: Sreedeep Moulik <sreedeep.m@samsung.com>

Reviewers: cedric, raster

CC: wonsik, jpeg, sreedeep.m, sanjay, govi

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-19 16:48:45 +02:00
Jean-Philippe Andre c64ea71dbe Evas: Fix potential resource leak in the TGV loader
The map would eventually be freed when closing the image.
But still...
2014-06-19 10:28:01 +09:00
Jean-Philippe Andre 5b1ed78605 Evas: Fix some comments in the TGV loader 2014-06-19 10:28:01 +09:00
Raoul Hecky 101929b3f4 evas_gl: add more matching formats to make cocoa_gl happy 2014-06-18 11:34:07 +02:00
Raoul Hecky f15034d2a6 evas_cocoa: more changes copied from sdl engine 2014-06-18 11:34:07 +02:00
Raoul Hecky d535a0e605 evas_cocoa: Update cocoa gl engine 2014-06-18 11:34:07 +02:00
Raoul Hecky 5f80f1fe09 evas_cocoa: correct include for GL 2014-06-18 11:34:07 +02:00
Raoul Hecky d29aac6fe7 evas_cocoa: remove eng_image_mask_create 2014-06-18 11:34:07 +02:00
Nicolas Aguirre 7182f87d51 evas: force equality in check otherwise i get debug output even if the environnement variable is not set. 2014-06-18 11:34:07 +02:00
Cedric BAIL bef09531c1 evas: move buffer engine to use more generic infrastructure. 2014-06-18 11:34:06 +02:00
Cedric BAIL c7ddcb14ac evas: move fb backend to use generic infrastructure a bit more. 2014-06-18 11:34:06 +02:00
Cedric BAIL edafa5344b evas: make X11 use more generic logic. 2014-06-18 11:34:06 +02:00
Cedric BAIL 3e3fde5db9 evas: add possibility for engine to also inherit part of the Render_Engine from software generic. 2014-06-18 11:34:06 +02:00
Carsten Haitzler 121f234e4e fix whitespace like trailing spaces and tabs 2014-06-18 16:23:23 +09:00
Jean-Philippe Andre a691b2ebf9 Evas gl: Fix ETC2 texture atlasses
ETC2 textures were allocated using the same empty slots pool
as RGBA textures.

ETC1 texture atlasses should still be tested.
An extension string is required to avoid using the bad
fallback in place right now. But there is no such thing yet.
2014-06-16 20:11:41 +09:00
Carsten Haitzler c1345ade8f partial fix for T518 - fix blank display on 2+ windows with gl
this fixes @draisch's report of blankness, but doesn't fix the
garbage. it's something to do with the always render move in elm gl -
it just doesn't seem to be rendering before evas renders, or if it is,
it's failing to work/produce content.
2014-06-16 19:24:33 +09:00
Jean-Philippe Andre d0d9dbfdba Evas: Add encoding parameter to the savers
ecore_evas_convert: Add -e/--encoding option

This uses directly the encoding parameter.
For now, used only by the TGV saver, but there is no other way
to specify between ETC1 and ETC2. And we don't have a mixed ETC1+2
mode (yet).

@feature
2014-06-13 16:05:48 +09:00
Jean-Philippe Andre ef80047ac9 Evas TGV: Optimize loader using NEON intrinsics
This can speed up the load a little (but I forgot the numbers).
Patch by Vladimir Kuramshin.
2014-06-12 17:47:56 +09:00
Jean-Philippe Andre dbd576b858 Evas gl: Enable texture atlasses with ETC1/2
We prefer ETC2 textures when ETC2 support has been detected.
According to the spec, glCompressedTexSubImage2D should work
for ETC2.

Try even with ETC1. This may fail at runtime. The fallback path
is very dubious right now but without a proper test case I'm
not sure which approach to take.

We can also imagine cases where the GPU supports TexSubImage for
ETC1 but ETC2 is not supported at all. This will need testing, as
this case is not handled.

@feature
2014-06-12 14:47:16 +09:00
Jean-Philippe Andre 90985d2282 Evas gl: Remove dlsym of glCompressedTexImage2D
The function was used directly in evas_gl_texture.c
It must be part of OpenGL core functions (since GLES 1.1
and OpenGL 2 I think).
2014-06-12 14:47:16 +09:00
Carsten Haitzler 03983be687 fix whitespace 2014-06-10 19:22:04 +09:00
Dongyeon Kim acc95afbd8 evas gl: distinguish between IMG and EXT MSAA extensions
Summary:
For drivers that support IMG_multisampled_render_to_texture,
GL_MAX_SAMPLES_IMG should be used to query max supported samples
Likewise, for drivers that support EXT_multisampled_render_to_texture,
GL_MAX_SAMPLES_EXT should be used to query max supported samples

@fix

Reviewers: seoz, Hermet, raster, cedric

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D948
2014-06-10 19:20:17 +09:00
Jean-Philippe Andre 74b56a4244 Evas TGV: Improve debug logs when saving ETC2
Separate PSNR between Alpha and RGB channels.
This will give results comparable to etcpack.
2014-06-10 14:58:28 +09:00
Jean-Philippe Andre c8b3568f32 Evas TGV: Add some debugging features 2014-06-10 14:58:27 +09:00
Jean-Philippe Andre cdf6e52974 Evas TGV: Add ETC2 support to the TGV saver
This will call the new ETC2 encoding functions.
Note that the quality and performance will be horrible, but at
least alpha should be supported.

Also, there is no way to choose between ETC1 and ETC2 from
the client API side, which, well, sucks. So ETC2 is selected
if and only if the image has alpha (according to its flag).

@feature: Encode images in ETC2 with support for Alpha (if needed).
2014-06-10 14:58:27 +09:00
Doug Newgard 096ae0e86f Evas: Update for giflib 5.1 api change
Summary: Slight change in the file close function.

Reviewers: jpeg

CC: cedric

Differential Revision: https://phab.enlightenment.org/D916
2014-05-30 08:32:26 +09:00
Carsten Haitzler 06c7fee700 evas loader - redo gif fix so it doesn't break everything
this fixes 96f9353f4c so it works right
@fix
2014-05-29 17:06:50 +09:00
Carsten Haitzler 20c350b9ef Revert "Evas: gif decoding bug fix"
This reverts commit 96f9353f4c.

This breaks gif playing BAAAADLY!
2014-05-29 14:21:54 +09:00
Jaehyun Cho abbfd23a22 gl_x11/evas_engine: Prevent dereference before NULL check
Summary: re->win pointer was not compared with NULL pointer before re->win was referenced.

Reviewers: Hermet

Reviewed By: Hermet

CC: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D910
2014-05-28 14:32:39 +09:00
Jaehyun Cho bc446e37c1 evas_gl_rectangle: Remove unnecessary conditional expression
Summary: The comparison gc->dc with NULL is not necessary. So the unnecessary conditional expression is removed.

Reviewers: Hermet

CC: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D909
2014-05-28 14:29:22 +09:00
Jean-Philippe Andre 525bc4117a Evas rg_etc1: Also decode RGBA8 from the TGV loader 2014-05-27 12:21:37 +09:00
Jean-Philippe Andre 4e358a582e Evas rg_etc2: Use new ETC2 decoder for RGB8_ETC2
Alpha support is still a TODO.
2014-05-27 12:21:30 +09:00
ChunEon Park 53e11f3b05 evas/gl_x11 - replace inlist counting to one api call. 2014-05-19 18:48:05 +09:00
U. Artie Eoff e186f6dbc5 evas/wayland_shm: unlink the REAL temporary file
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-05-14 16:13:33 -07:00
Jean-Philippe Andre 5d560dd2b9 Evas: Fix abort() when using ETC2 with alpha 2014-05-12 14:44:55 +09:00
Cedric Bail 6a3913b41e evas: remove logically dead code.
CID 1211984.

Note that in error case, the calloc is either not passed or
returned NULL so free will never be called.
2014-05-10 13:18:55 +02:00
Cedric Bail 7c1679550b evas: fix uninitialized value usage in Evas_3D.
This code look suspiciously similar to src/lib/evas/canvas/evas_3d_mesh.c
line 682.
2014-05-10 12:08:45 +02:00
Chris Michael ad72fa0649 evas-wayland-shm: Fix 'oopsie/typo' in temporary file name template
@bugfix: When creating a temporary file for the buffer's mmaped data,
we need to make sure there is an appending '/' in the name else
mkstemp will fail due to improperly formatted filename.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-05-09 08:30:12 +01:00
Chris Michael 8c86148a7b evas-wayland-shm: Use XDG_RUNTIME_DIR if available for creating mmap'd
buffer file.

@bugfix: When we create the mmap'd file for shm buffer access, try
using the XDG_RUNTIME_DIR first as the place to create the file. If
that does not exist in the environment, Then fallback to using /tmp
directory.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-05-09 08:00:44 +01:00
Jérémy Zurcher 9a79d1e864 silence a few warnings 2014-05-08 00:15:53 +02:00
Jérémy Zurcher f8c2c57406 do not use EINA_FALSE instead of NULL 2014-05-07 17:45:11 +02:00
Cedric Bail 4bf0a64358 evas: let's not leak on failure.
CID 1210815
2014-05-04 00:20:12 +02:00
Cedric Bail 202b3ad6ba evas: behave nicely with unitialized data.
CID 1210818

It would be a better and more working fix to use Evas_GL_Image, sadly
no time to do it right now and may be to intrusive for an alpha release.
2014-05-04 00:16:35 +02:00
Cedric Bail ede36d8382 evas: fix use of uninitialized pointer.
CID 1210819
2014-05-04 00:14:52 +02:00
Cedric Bail 36e8daf187 evas: protect against lacking light. 2014-05-01 12:05:37 +02:00
Carsten Haitzler d237f2236d return stride for yuv formats as width in bytes (y width). 2014-04-29 23:11:23 +09:00
Jean-Philippe Andre fa9f7a4c89 Evas: Fix stretching of ETC1/2 textures
ETC1/2 textures are (for now) allocated one by one for each image,
because we use only glCompressedTexImage (not SubImage). So,
the texture height must fit that of its content.

This commit bypasses the usual pool allocation logic where textures
are rounded up to the next multiple of 16 pixels in height, in
case of ETC1/2.
2014-04-29 15:48:47 +09:00
Jean-Philippe Andre 8c2e98b840 Evas: Fix wrong comment 2014-04-29 09:03:40 +09:00
ChunEon Park 78142d0566 evas/gl - make simple.
it already prints error msg inside new functions.
2014-04-28 20:51:02 +09:00
Daniel Zaoui f10d8c42bb Evas_3d: Fix warning.
The variable was defined twice.
2014-04-27 11:12:06 +03:00
Cedric Bail 53a9fcf301 evas: remove Evas_3D legacy API. 2014-04-25 19:29:08 +02:00
Cedric Bail a4fd5ac3dd evas: fix broken build with OpenGL ES backend.
This is a temporary fix, once we move to Evas_GL_Image, it shouldn't
be needed anymore. Thanks to Cédric "chep" Chépied for reporting the
issue.
2014-04-25 16:46:46 +02:00
ChunEon Park 27c1b12825 evas3d: fixed grammartical break. 2014-04-25 17:03:19 +09:00
ChunEon Park 6ecdc5cbd2 evas/evas3d - use the image loader of the evas instead of the png lib. 2014-04-25 17:02:51 +09:00
subhransu e84e28fc22 Evas_3D : Eolian change
Conflicts:

	src/Makefile_Evas.am
	src/lib/evas/Evas_3D.h
	src/lib/evas/Evas_Eo.h
2014-04-25 16:58:47 +09:00
Jean-Philippe Andre 86ce491a86 Evas gl_x11: Add ETC2 support to the GL/X11 engine
This should allow texture upload with ETC2 RGB8 or RGBA8 formats.
Untested for now...

@feature
2014-04-25 16:50:29 +09:00
Jean-Philippe Andre ef3a36626f Evas: Add support for ETC2 in the TGV loader
There is an ifdef HAVE_ETC2_DECODER to disable unimplemented code.

Since these ETC2 decoding function are not implemented yet,
they should be disabled at compile time.

Yes, this means Evas will not be able to load those images in case
of SW engine or GL engine w/o ETC2 support.

@feature
2014-04-25 16:50:29 +09:00
Jean-Philippe Andre 947fc3e098 Evas TGV: Add direct copy mode for ETC1/ETC2 data
If the image is already in ETC1 or ETC2, then just copy its data
(and LZ4 compress it).

@feature
2014-04-25 16:50:28 +09:00
Taekyun Kim 26e43f938f Evas: 3D: Fix typo error in preprocessor for GLES 2014-04-25 16:19:29 +09:00
Taekyun Kim 8fda631730 Evas: 3D: Introducing 3D scene rendering features
Enable 3D features using --enable-evas-3d=yes when configuring.
APIs are exposed through Evas_3D.h.
Currently, evas-3d is being supported only on gl_x11 engine.

Conflicts:

	src/lib/evas/Evas_Eo.h
2014-04-25 16:15:41 +09:00
Jaeun Choi 96f9353f4c Evas: gif decoding bug fix
Gif decoder decodes prior frames sequentially to decode a specific frame.
The last frame of sequential decoding, which is the frame we want to decode,
remains un-decoded until the while loop stops.
The frame count should be incremented after the comparison statement.
2014-04-25 15:26:48 +09:00
Jean-Philippe Andre 28ce791dfa Evas TGV: Fix distortion of TGV images (ETC1)
Due to some invalid geometry considerations, there was a
1 pixel distortion in images, varying with the lz4 compressed
macro-block size.

Anyhow, I couldn't wrap my head around Cedric's code. So I rewrote
the whole thing instead, fixed it and improved the block size
selection (based on the image size, to optimize lz4 compression).
2014-04-25 12:08:56 +09:00
Jean-Philippe Andre c0aa0b3410 Evas gl: Don't swap RGBA colors with ETC1
Since rg_etc1 now outputs proper BGRA data, the shaders should not
swizzle the colors around. Stick to the normal fragment shaders.

Note: This is not tested.
2014-04-22 19:53:55 +09:00
Jean-Philippe Andre 2ff9b054f9 Evas gl_x11: Fix abort() in evas_object_image_data_get()
Since the introduction of new colorspaces for GL_X11
(GRY8, AGRY88 and ETC1), stride_get() would return
an invalid value and data_get() would just abort().

Add proper support for these functions.
ETC1 data will NOT be returned from data_get() and
stride_get() will return 0. This is to avoid people from
messing up badly with encoded color spaces.
2014-04-22 17:46:30 +09:00
Jean-Philippe Andre 356939a8fd Evas: Add comments to the TGV saver (FIXME)
The block size has a visual effect. This is obviously a bug.
2014-04-18 18:33:42 +09:00
Cedric Bail b1729b0754 evas: let's check fwrite work as expected.
CID 1195441.
2014-04-17 21:21:54 +02:00
Cedric Bail 82b2c8df9e evas: fix TGV loader to not leak ressource.
CID 1195443.
2014-04-17 21:18:32 +02:00
Jean-Philippe Andre 558e7827f1 Evas gl: Fix texture border drawing
Since the introduction of color spaces other than RGBA8888 in
the GL engines, there was an issue with border images scaled in
GL. The left and right edges were simply not properly copied.

This would then show artifacts when scaling very thin images
(typically 2px wide).
2014-04-17 15:01:54 +09:00
Jean-Philippe Andre 07700a799c Evas TGV saver: Use medium quality by default
The default quality is 80 and high quality is horribly slow,
so default to medium quality instead (it's already very slow).

If you really want to shoot yourself in the foot and use high
quality, just set quality > 95 and go make some coffee.

Also, disable dithering, it creates horrible artifacts on real
life pictures (gradients and flat surfaces especially).
2014-04-17 10:25:37 +09:00
Jean-Philippe Andre 70cdfc44aa Evas ETC1: Use LZ4HC for higher compression ratios
LZ4HC has a higher compression ratio than LZ4 but basically the
same decompression speed.

The performance cost during encoding is actually still pretty low
considering how expensive ETC1 compression can be (even at medium
quality).
2014-04-15 18:50:37 +09:00
Jean-Philippe Andre 54fb9b2346 Evas: Use Evas_Colorspace to declare cspace
Why use int when we have a proper type?
All these APIs are internal.
2014-04-15 18:50:37 +09:00
Carsten Haitzler 9e100627a7 fix recent png loader break with etc1 support that broke interlaced imgs
this fixes the png loader code to use png_read_row properly with the
number of passes needed to load aninterlaced image as well as handling
this right with scale ratio scaledown set.
2014-04-15 17:56:07 +09:00
Stefan Schmidt 5f0c9e43b5 engines/evas_drm: Remove some unused variables 2014-04-11 11:31:37 +02:00
Jean-Philippe Andre 198b33c69a Evas gl: Remove unused variable 2014-04-08 17:50:21 +09:00
Jean-Philippe Andre 60d144d963 ETC1 encoding: fix typo in TGV and EET savers
If quality is >30 && <=70 then choose medium params, not low.
Spotted by Snacker, thanks.
2014-04-08 15:58:58 +09:00
Carsten Haitzler 9d87d155f7 fix swap buffers with damage to not detect if ext str is not there
@fix
2014-04-05 22:21:13 +09:00
Jean-Philippe Andre 3cb7b19608 Evas: Fix harmless typo in eet image loader
Spotted by Snacker, thanks.
2014-04-04 18:07:12 +09:00
Chris Michael 1005cd8f89 evas-drm: Remove all async_page_flip options/references
Async page flip can cause tearing, is not supported on all cards, and
apparently requires a specific libdrm patchlevel...in general, more
trouble than it's worth, so let's just remove it.

@bugfix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-04 07:51:06 +01:00
Chris Michael c208f43814 evas-drm: Default async page flip to false as this can cause tearing
Async page flip can cause visual tearing, so disable by default for
all cards.

@bugfix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-04 07:32:59 +01:00
Jean-Philippe Andre 0e1b52875d Evas cserve2: Fix crash in elm_test GLView
This whole cache/cache2 API duplication is a complete mess.
2014-04-04 10:28:45 +09:00
Jean-Philippe Andre ecb8ce8748 Evas gl: Fix colors when using ETC1 textures
We need to use the RGBA shader to invert R and B otherwise
those will be inverted on the screen.
2014-04-04 10:16:01 +09:00
Jean-Philippe Andre b439b8c9be Evas: Fix TGV loader to properly copy ETC1 data
There was some invalid arithmetics with the buffer offset.
2014-04-04 10:08:09 +09:00
Jean-Philippe Andre c67db4c47b Evas gl: Fix dlsym usage for glCompressedTexImage2d
This symbol should be part of the loaded libraries, can be found
using dlsym, even if eglGetProcAddress() returns NULL.

Add etc1 flag in the debug output.
2014-04-04 10:08:09 +09:00
Jean-Philippe Andre 018e2d33b2 Evas gl: Use implicit cast to DATA8 with image.data8
data8 is there precisely to avoid casting the iamge data when
handling it as DATA8.

This is purely a cosmetic change
2014-04-04 10:08:09 +09:00
Cedric BAIL 4c390fb984 evas: fix use of unitialized data in eet loader.
should fix T1144.
2014-04-02 14:23:49 +09:00
Cedric BAIL 36321b872e evas: make eet negociate it's colorspace with evas. 2014-04-01 22:00:54 +09:00
Cedric BAIL 854dd14474 evas: add ETC1 texture format support to Evas. 2014-04-01 22:00:54 +09:00
Cedric BAIL 5140ef6bc4 evas: follow change 2fd69743f9 in the saver. 2014-04-01 22:00:47 +09:00
Cedric BAIL 2fd69743f9 evas: change TGV internal encoding to account for GPU needs of duplicated border.
With OpenGL, the border of a texture are not "well" defined. So interpolation at
the border can result in weird/bad looking texture border. To avoid that we do
duplicate the border in all direction at the time of the texture upload. But with
ETC1 it is not possible as the border are grouped with 15 others pixels. It needs
to be done at saving time. So internally we do have an image that would be of
size width + 2 pixels and height + 2 pixels.
2014-04-01 22:00:15 +09:00
Cedric BAIL d1581f8ca9 evas: support uploading AGRY88 and GRY8 directly to GPU. 2014-04-01 22:00:15 +09:00
Cedric BAIL 6988a38a7b evas: fix png loader to actually produce lower resolution content when asked. 2014-04-01 22:00:15 +09:00
Cedric BAIL 3684b749be evas: add support for GL_LUMINANCE_ALPHA and GL_LUMINANCE when loading image from disk. 2014-04-01 22:00:15 +09:00
Cedric BAIL 641576f7f8 evas: add png support for other color space output. 2014-04-01 22:00:15 +09:00
Cedric BAIL b1e5760811 eet: add internal encoding to ETC1 as an alternate solution to Jpeg. 2014-04-01 22:00:15 +09:00
Cedric BAIL e47dbc02ea evas: let TGV loader choose which encoding it want.
If region is specified we will not allow ETC1 colorspace as it would
basically break at the frontier as we would be unable to generate a
duplicate of the border as GPU require if you want nice and correct
rendering. So no region and ETC1 output at the same time.
2014-04-01 22:00:15 +09:00
Cedric BAIL dc75a1fcff evas: remove dead code. 2014-04-01 22:00:15 +09:00
Cedric BAIL 0609779f17 evas: add TGV saver module. 2014-04-01 22:00:13 +09:00
Cedric BAIL 961ecab040 evas: add a tgv loader.
The TGV file format is specifically created for Evas. It is designed to allow
region decompression and parallele decompression with a fast path for GPU that
do handle ETC1 compression. Plan for adding other compression method will come
later.
2014-04-01 22:00:13 +09:00
Chris Michael 531d6f3515 evas-drm: Add trapping for a canvas below framebuffer size
@bugfix: This adds some safety trapping for trying to create a canvas
below the drm framebuffer size. Drm does not support creating a canvas
smaller than the framebuffer output, so we will add some trapping to
catch that, and internally create the framebuffers to the proper size.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-01 07:09:49 +01:00
Anand caabcbe408 evas: Fixed warning for uninitialized variables
Summary:
Warning fixed of evas

modules/evas/engines/gl_common/evas_gl_context.c: In function 'evas_gl_common_context_new':
modules/evas/engines/gl_common/evas_gl_context.c:392:32: warning: 'minor' may be used uninitialized in this function [-Wuninitialized]
modules/evas/engines/gl_common/evas_gl_context.c:314:8: note: 'minor' was declared here
modules/evas/engines/gl_common/evas_gl_context.c:392:16: warning: 'major' may be used uninitialized in this function [-Wuninitialized]
modules/evas/engines/gl_common/evas_gl_context.c:313:8: note: 'major' was declared here
@fix
Compilation Warning Fixed

Test Plan: Compile efl

Reviewers: singh.amitesh

CC: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D656
2014-03-24 17:03:32 +09:00
Cedric BAIL a9d38e6df7 evas: cleaner fail handler. 2014-03-24 11:41:20 +09:00
Jihoon Kim 014183a1b7 evas_gl: fix memory leak in case that version doesn't include dot
fix CID 1193479
2014-03-23 13:36:00 +09:00
ChunEon Park 461555e4cc evas/gl - fill up missed blend mode.
Still there few mode are unsatisfied.

@fix
2014-03-22 21:09:58 +09:00
ChunEon Park f556cd1328 evas/gl - don't set blend function in RENDER COPY mode.
it's enough that just disabling the blend mode.
2014-03-22 20:30:27 +09:00
Carsten Haitzler 939669d6ce warnings-- 2014-03-22 19:19:48 +09:00
Cedric BAIL 837391c5da evas: let's be more resistant even with things that should never happen.
Fix CID 1193212.
2014-03-20 16:53:13 +09:00
Stefan Schmidt 80497d75bc evas/gl_x11: Cast GLubyte to const char for strstr
The GLubyte we are getting back here are strings we want to search
in with strstr. Cast is only to avoid warnings.
2014-03-19 11:48:46 +01:00
Chris Michael 3ec7c4b517 evas-drm: Fix engine to use the output's framebuffer as window id
@fix: ecore_evas_window_get expects an Ecore_Window to be returned.
Because of this, we need to have a 'window' that can be returned via
ecore_evas. For this case, we will use the output's framebuffer id as
the 'window' so we need to set that into the engine info so that
ecore_evas can fetch it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-18 09:12:57 +00:00
Jean-Philippe Andre 7cbe636311 Evas gl: Fix clip in image_draw if it's not set
In evas_gl_common_image_draw, if an image is drawn with a fresh context,
containing no clip and no cutouts, then it will be wrongly clipped to
the source image size instead of the destination surface size.

This case seems to never happen, ever, since the contexts are always
fully set by the render functions.

@fix
2014-03-18 18:03:40 +09:00
Jean-Philippe Andre 8672f3176e Evas gl_x11: Do not premultiply pixels after reading FBO
The pixels are already premultiplied in such an FBO.

(cherry picked from commit 2b3e065ffeb9b587ca35909940beb59b25081e7f)
2014-03-18 15:44:15 +09:00
Jean-Philippe Andre 1a9b58f083 Evas gl: Fix buffer dump filenames
evas_gl_common_buffer_dump can be used to dump all frames into
a series of PNG files. But the filename contained some garbage
characters (and potential segv, too).

(cherry picked from commit a0f886138ed5a28d0d1596df3b805fca06d1ae31)
2014-03-18 15:44:13 +09:00
Jean-Philippe Andre 7ad4a269e0 Evas gl_x11: Fix usage of glReadPixels
It is not necessary to dynamically link to glReadPixels since
this is not an extension. This code wouldn't even work on some
devices.

Also, the pixels returned are not premultiplied (yeah >_<)

And some devices (EGL) don't support GL_BGRA... so glReadPixels
would just fail and not fill in the pixels. Conversion is required.
2014-03-13 17:04:42 +09:00
Chris Michael c4fb746e0c evas-drm: Remove private framebuffer
We don't need to store the framebuffer of the Outbuf as it's only used
once to set resolution.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-10 12:40:31 +00:00
Chris Michael 005169d775 evas-drm: Remove private framebuffer field from Outbuf structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-10 12:40:31 +00:00
Chris Michael 8a8924ba79 evas-fb: Fix broken build of efl
@bugfix: structure fb_var_screeninfo does not have a colorspace field
defined in linux/fb.h, so (for now) comment out code which was
referencing that field. Not sure what the intent was here, but build
was broken because of this.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-10 07:20:26 +00:00
Jean-Philippe Andre a6950567a3 Evas filters: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER
GL_READ_FRAMEBUFFER isn't defined when compiling for Wayland
Thanks Stefan for the report.

Also, import GL_FRAMEBUFFER overrides from other GL files, so
that it points to the proper extension (_OES or _EXT if applicable).
2014-03-07 17:48:23 +09:00
Gustavo Sverzut Barbieri 856b7bdf44 evas/fb: use stride instead of width.
While most framebuffes use stride = width, some may have stride bigger
than width to provide better alignment. Then we must always use stride.

Thanks to Arjan van de Ven, the one that spotted the issue.

@fix
2014-03-07 02:00:11 -03:00
Jean-Philippe Andre 59f5216391 Evas gl_x11: Add support for glReadPixels
This will be needed by the filters for proxy rendering,
for textures and maps (displacement).

Add new engine functions to unleash the (sluggish) power of glReadPixels.
The idea is to be able to bypass glReadPixels later, so 3 new APIs are
added:
- surface_lock
- surface_read_pixels
- surface_unlock
They must be called in that order.

Note (for history):
glReadPixels was always getting the wrong data during first draw,
but the right data during a redraw...
Why? Well simply because for OpenGL itself, the image had never
been drawn in teh first place! Only the Evas GL context knew
about the image drawing, as it was queued somewhere in the pipe.

One line solution: Call evas_gl_common_context_flush before
doing anything else.
2014-03-07 11:07:09 +09:00
Cedric BAIL 34b9c51976 evas: let's still compile when we have no hw accel for DRM. 2014-03-07 09:35:16 +09:00
Gustavo Sverzut Barbieri 05331160cb evas/fb: implement evas_fb_outbuf_fb_reconfigure()
refactor code used in evas_fb_outbuf_fb_setup_fb() so it can be used
in evas_fb_outbuf_fb_reconfigure().
2014-03-06 11:19:14 -03:00
Gustavo Sverzut Barbieri 4db31af9f0 evas/fb: use a copy of fb_var since ioctl() modifies it and we consider it const 2014-03-06 11:19:13 -03:00
Gustavo Sverzut Barbieri 3eddfa9366 evas/fb: make sure FB_Mode attributes are zeroed.
We may read only geometry or timings, then make sure memory is fully
zeroed by doing a memset on the new array item.
2014-03-06 11:19:13 -03:00
Gustavo Sverzut Barbieri 8ddb826378 evas/fb: extensive logs to help solve bugs.
FrameBuffer can be tricky with all combinations and it's hard to tell
users to send useful information, then print the information we use so
we can get useful bug reports.
2014-03-06 11:19:12 -03:00
Gustavo Sverzut Barbieri 587a171061 evas/fb: expose and call fb_freemode() and fb_cleanup()
properly clean memory and restore framebuffer on error conditions.

@fix
2014-03-06 11:19:12 -03:00
Gustavo Sverzut Barbieri b0aa7325ae evas/fb: handle fds using -1 for unset/error.
clean evas_fb_main.c so it returns -1 to indicate invalid fds, same as
open() and what is written in evas_fb.h example.

call fb_cleanup() in all error conditions and always return -1 in
fb_postinit() if we did call fb_cleanup().
2014-03-06 11:19:12 -03:00
Gustavo Sverzut Barbieri bf2abf12b4 evas/fb: avoid crashing it outbuf setup failed.
if fb setup fails, then we shouldn't use re->ob as it's NULL.

@fix
2014-03-06 11:19:11 -03:00
Chris Michael 06afd41355 evas-drm: Add headers for hardware acceleration
@bugfix: Add missing headers for egl/gl support in evas-drm

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-06 11:02:25 +00:00
Chris Michael 4bcd26d5b9 evas-drm: Remove hardware acceleration fields from engine structure
@bugfix: Removed hardware acceleration fields from engine structure.
These are now located inside the buffer management code itself, so no
need for them here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-06 10:59:44 +00:00
Chris Michael 2a1c6e02fb evas-drm: Add buffer management file
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-06 09:26:03 +00:00
Chris Michael 238208b829 evas-drm: Fix setting cached image alpha flag
@bugfix: Set cached image alpha flag properly

This fixes issue where cached image alpha flag was not set properly.
Set it according to the outbuf's destination alpha flag.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-05 14:12:58 +00:00
Chris Michael 3692f0905c evas-drm: Check buffer validity in swap function
@bugfix: Check (and set) buffer validity before calling
framebuffer_send. This fixes an issue where buffer was not valid,
causing next_update_get to do full Copies.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-05 14:12:58 +00:00
Chris Michael b117d48159 evas-drm: Don't call framebuffer set from within send function
@bugfix: We cannot call framebuffer_set from within the send function
because if we are not vsync'd then framebuffer_set would never be
called and thus the buffer would not be marked as valid, causing full
Copies to happen.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-05 14:12:58 +00:00
Chris Michael 1904466ebc evas-drm: Fix evas drawing delay for cedric
@bugfix: Draw to the front buffer first, instead of the back buffer.

Frenchie says this improves the "initial rendering delay" of expedite
tests. Originally, we were drawing to the back buffer first, then
flipping it onto the crtc when drawing was done. This presented a
"perceived" rendering delay when running expedite tests as it would
wait for the back buffer to be drawn before presenting it. Personally,
I think it is not good to draw directly to the front buffer first as
it may get presented "incomplete" ... but cedric says it draws fine so
we'll leave it starting on the front buffer (for now).

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2014-03-03 16:07:18 +00:00
Chris Michael 886c8d55b7 evas-drm: Ddd support for setting vsync with env variable.
@feature: Add support for EVAS_DRM_VSYNC environment variable to
@feature: Add support for marking a Framebuffer as dirty.
@bugfix: Fix color mask values for evas conversion functions.
@bugfix: Start with using the Backbuffer for drawing.
@bugfix: Fix previous Slowness with evas_cache image data.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael 7ca6837084 evas-drm: Add vsync/non-vsync support to evas_drm code
@feature: Add ability to render software buffers using vsync or not
@bugfix: Fix drmModeAddFB to use proper depth & bpp when adding FB
@bugfix: Fix mmap to use NULL (not 0) so that kernel assigns memory
address.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael 09b69d567e evas-drm: cleanup evas_engine code for drm sw engine
@bugfix: clear the tilebuffer when we get the next redraw update.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael 54680b1f97 evas-drm: cleanup outbuf structure and functions
@bugfix: this cleans up the Outbuf structure by removing unused
fields, Fixing some function declarations, and defaulting the number
of buffers to 2 (double-buffering)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael aafd8e5277 evas-drm: Add flag for setting vsync to engine structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael c52d47ba36 evas-drm: Break out plane creation code into it's own function for cleaner code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:12:51 +00:00
Chris Michael 62a6b32ed3 evas-drm: Start on hardware Plane support
@feature: Start on hardware Plane support
 - Add Plane structure
 - Store list of Planes in the Output buffer

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:12:31 +00:00
Chris Michael fcd4929702 evas-drm: Add field to engine info for storing the buffer manager
- Typically this will come from ecore_evas and be used by evas to
allocate hardware accelerated buffers (gbm, tbm, etc)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:11:58 +00:00
Chris Michael 8a18515c7c evas-drm: Fix opening of drm card
@feature: Add code to check if async page flipping is supported by the driver.
@bugfix: Add code to get the proper drm driver name when we init the card.
@bugfix: Use drmOpen when opening the card so that any sub-driver gets initialized.
@bugfix: Add some debug/testing code to enumerate planes.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:10:55 +00:00
Chris Michael 258ce60930 evas-drm: Call framebuffer_set earlier in the process so that the screen gets
updated sooner.

@bugfix: set framebuffer on crtc earlier in process
@bugfix: Set the rendered image's alpha flag to be equal to the output buffer's

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:10:21 +00:00
Chris Michael ccbdd2137f evas-drm: Triple buffer by default.
@feature: Triple buffer by default on drm engine

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:10:00 +00:00
Chris Michael d21ab6f597 evas-drm: Start on hardware-accel support for drm
@feature: Start on hardware acceleration support by adding EGL
structure to engine info

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:09:37 +00:00
Chris Michael b42af265be evas-drm: Add Evas Drm Engine (software only currently)
@feature: Add working Evas_Drm Engine (software only currently)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:08:19 +00:00
Chris Michael 44e023c888 bugfix: Fix Wayland Shm engine destination calculation typo
When rotation is 0, we need to advance the destination pointer in the
X direction by a Multiple of Bits-Per-Pixel...not an addition.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-26 11:36:27 +00:00
Jean-Philippe Andre e7e3f73bbe Gif: Fix animated gifs when used as proxy sources
This looks like a typo: if (animated > 1) when animated is a... Bool!

So, I am not entirely sure why this bug is visible in case of gif
proxies, all it seems that the load_data function may be called
multiple times when the object is visible. So gif close and reopen
happen properly, and the first frame can be decoded.
2014-02-17 16:59:43 +09:00
Sung W. Park 2b4a7b438d evas gl: added partial rendering support for qcom extension
When running in direct rendering mode, properly support partial
rendering if the extension is properly supported.

Also, fixed the SwapBufferwWithDamage rectangle coordinate bug.
It wasn't properly y-inverted before.
2014-02-15 02:33:47 +09:00
Carsten Haitzler 93da35c5ab evas - gl - core - checke for wrong context in error check
this fixes CID 1135266
2014-02-13 19:38:13 +09:00
Carsten Haitzler 2e95690201 evas - gl x11 - fix glx texture from pixmap target rectangle mode check
even though we don't support rectangle bits in texture targets for
texture-from-pixmap the code checked and complained - problem is it
checked the wrong thing. fixes CID 1135267
2014-02-13 19:35:17 +09:00
Carsten Haitzler 153bbd8003 evas - gl core - don't access null ptr on init
this fixes CID 1135270
2014-02-13 19:19:59 +09:00
Wonsik Jung 48b95c4538 evas: software_x11 - use evas_xlib_swapper_depth_get to get buffer stride.
Summary: when image cache is created, buffer's size should use stride value.

Test Plan: Create small size window, then try to resizing that.

Reviewers: tasn, seoz, raster, cedric

Reviewed By: cedric

CC: tasn, seoz, raster, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-10 14:54:43 +09:00
Wonsik Jung 6ea0566e6c evas: add eglMakeCurrent in evas map create/free.
Summary: Ensure Evas's eglContext when several eglContexts are used.

Test Plan:
1. Native GLES application works with evas_object_image_native_surface_set
2. One Evas object works with evas map.

Reviewers: seoz, tasn, cedric

Reviewed By: cedric

CC: cedric, raster

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-10 10:40:56 +09:00
Wonsik Jung 0e04219758 Add quadruple swap mode for partial rendering
Summary: This patch is for QUADRUPLE window buffers.

Test Plan:
When enlightenment uses quadruple buffers or window system can support quadruple buffers,
application can use quadruple buffers with partial rendering

Reviewers: tasn, seoz, raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D527
2014-02-08 23:04:04 +09:00
Jean-Philippe Andre 0135b45c12 Evas filters: OpenGL support part 1.
Quick and dirty solution to support the OpenGL engine:
[1] Allocate CPU buffers
[2] Render text and process all effects to these buffers
[3] Push final image as an OpenGL texture.

This patch implements [1].
2014-02-07 17:33:17 +09:00
Wonsik Jung 3420eda31a evas: gl backend - ensure eng_window_use in image_content_hint_set
Summary: Ensure eng_window_use in image_content_hint_set

Test Plan:
1. make native OpenGLES application.
2. set evas object image  with evas_object_image_native_surface_set.
3. GLES Application try to call eglMakeCurrent with own eglContext, then resize evas object resize

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

CC: cedric, seoz

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-07 12:18:16 +09:00
Carsten Haitzler 93fd2263fc evas gl - fix egl/gles build after alpha4 change for fonts 2014-01-13 07:02:24 +09:00
Carsten Haitzler 86a97efeea evas - fonts - move to using 4bit and rel 4 bit compressed font glyphs
this changes the internal encoding of font glyphs in evas to use 4bit
uncompressed if small, or 4bit rle (run length encoded) if larger.
this caves at least 50% of memory on fonts - and more if bigger. with
large fonts (40-80pixel size) we can save in the region of 80% of
memory used for glyphs. this also happesn to allow speedups in
rendering too.
2014-01-13 05:15:32 +09:00
Carsten Haitzler f21b0ee6c3 evas gl - prefer alpha4 format for font textures if possible (save memory)
if alpha4 is possible (desktopgl) then use it for fonts as this should
cut memory in half for them and possibly speed things up due to less
memory bandwidth needed
2014-01-13 05:15:32 +09:00
Carsten Haitzler ee9f80f246 comment out unreachable code
fixes CID 1132633
2014-01-10 19:04:32 +09:00
Carsten Haitzler 3de45a2c4b evas gl - comment out unreachable code
fixes CID 1132634
2014-01-10 19:00:54 +09:00
Carsten Haitzler e8c13118eb fix mingw build for setuid fix/checks 2014-01-08 22:06:41 +09:00
Carsten Haitzler b95ef3801f setuid safeness - ensure if an app that is setuid doesn't do bad things
this makes efl ignore certain env vars for thnigs and entirely removes
user modules (that no one ever used) etc. etc. to ensure that *IF* an
app is setuid, there isn't a priv escalation path that is easy.
2014-01-08 19:46:23 +09:00
Carsten Haitzler e9783c3caf evas - gl-x11 engine - put in guessed blacklist of yinvert extn for intel mesa 2014-01-07 16:28:46 +09:00
Carsten Haitzler 2373e1f636 evas - gl-x11 remove +x bit on src file! 2013-12-30 18:27:06 +09:00
Carsten Haitzler acf7dfa579 evas - gl engine - glerr should be off by default for performance
stable release - cherry-pick me!
2013-12-27 17:32:15 +09:00
Carsten Haitzler 153a744e67 evas gl engine - ensure on texture delete we never leave a cur tex id dangling 2013-12-26 21:04:25 +09:00