raster pushed a commit to branch master.
commit 7cae29becd94db622fec247a2974a0cc8bd3828a
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date: Thu Apr 18 15:16:40 2013 +0900
fix evas gl_x11 in 16bpp (and similar depths).
---
ChangeLog | 5 +++++
NEWS | 2 +-
src/modules/evas/engines/gl_x11/evas_x_main.c | 18 ++++++++++++------
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3d26874..322a183 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-14 Carsten Haitzler (The Rasterman)
+
+ * Evas: Fix evas gl_x11 to use default depth when visual
+ matching so lower depth displays work
+
2013-04-15 ChunEon Park
* 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.
diff --git a/NEWS b/NEWS
index 860ec51..ba08f8b 100644
--- a/NEWS
+++ b/NEWS
@@ -249,4 +249,4 @@ Fixes:
* Evas: fix gif bug related with scale down decode.
* Evas textblock: Fixed a bug with deletion of ranges that end just a
visual format.
* 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.
-
+ * Evas: Fix evas gl_x11 in 16bpp and lower depths than 24/32 bpp.
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c
b/src/modules/evas/engines/gl_x11/evas_x_main.c
index 5c75984..d0de1df 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -669,7 +669,7 @@ eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo)
config_attrs[i++] = GLX_RED_SIZE;
config_attrs[i++] = 1;
config_attrs[i++] = GLX_GREEN_SIZE;
- config_attrs[i++] =1;
+ config_attrs[i++] = 1;
config_attrs[i++] = GLX_BLUE_SIZE;
config_attrs[i++] = 1;
if (alpha)
@@ -715,11 +715,17 @@ eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo)
if (!alpha)
{
config = configs[i];
- _evas_gl_x11_vi = malloc(sizeof(XVisualInfo));
- memcpy(_evas_gl_x11_vi, visinfo, sizeof(XVisualInfo));
- fbconf = config;
- XFree(visinfo);
- break;
+ // ensure depth matches default depth!
+ if (DefaultDepth(einfo->info.display, 0) ==
+ visinfo->depth)
+ {
+ _evas_gl_x11_vi = malloc(sizeof(XVisualInfo));
+ memcpy(_evas_gl_x11_vi, visinfo,
+ sizeof(XVisualInfo));
+ fbconf = config;
+ XFree(visinfo);
+ break;
+ }
}
else
{
--
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter