devilhorns pushed a commit to branch master.
commit 9a4fc9ad44b6aec40abd7cb4c763cb63d9f5ac04
Author: Chris Michael <[email protected]>
Date: Thu Jul 11 10:47:08 2013 +0100
Add engine interface code for:
- ecore_evas_pixmap_visual_get
- ecore_evas_pixmap_colormap_get
- ecore_evas_pixmap_depth_get
Assign interface functions for above when creating the new interface.
When creating the pixmap, store the visual and colormap for later
retrieval.
Signed-off-by: Chris Michael <[email protected]>
---
src/modules/ecore_evas/engines/x/ecore_evas_x.c | 58 +++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index afb41a9..260ae40 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -3718,6 +3718,8 @@ ecore_evas_software_x11_pixmap_new_internal(const char
*disp_name, Ecore_X_Windo
edata->pixmap.w = w;
edata->pixmap.h = h;
edata->pixmap.depth = einfo->info.depth;
+ edata->pixmap.visual = einfo->info.visual;
+ edata->pixmap.colormap = einfo->info.colormap;
/* create front and back pixmaps for double-buffer rendering */
edata->pixmap.front =
@@ -3775,6 +3777,30 @@ _ecore_evas_software_x11_pixmap_get(const Ecore_Evas *ee)
return (Ecore_X_Pixmap) edata->pixmap.front;
}
+static void *
+_ecore_evas_software_x11_pixmap_visual_get(const Ecore_Evas *ee)
+{
+ if (!(!strcmp(ee->driver, "software_x11"))) return 0;
+ Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
+ return edata->pixmap.visual;
+}
+
+static unsigned long
+_ecore_evas_software_x11_pixmap_colormap_get(const Ecore_Evas *ee)
+{
+ if (!(!strcmp(ee->driver, "software_x11"))) return 0;
+ Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
+ return edata->pixmap.colormap;
+}
+
+static int
+_ecore_evas_software_x11_pixmap_depth_get(const Ecore_Evas *ee)
+{
+ if (!(!strcmp(ee->driver, "software_x11"))) return 0;
+ Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
+ return edata->pixmap.depth;
+}
+
static void
_ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on)
{
@@ -4118,6 +4144,8 @@ ecore_evas_gl_x11_pixmap_new_internal(const char
*disp_name, Ecore_X_Window pare
edata->pixmap.w = w;
edata->pixmap.h = h;
edata->pixmap.depth = einfo->info.depth;
+ edata->pixmap.visual = einfo->info.visual;
+ edata->pixmap.colormap = einfo->info.colormap;
/* create front and back pixmaps for double-buffer rendering */
edata->pixmap.front =
@@ -4170,6 +4198,30 @@ _ecore_evas_gl_x11_pixmap_get(const Ecore_Evas *ee)
return (Ecore_X_Pixmap) edata->pixmap.front;
}
+static void *
+_ecore_evas_gl_x11_pixmap_visual_get(const Ecore_Evas *ee)
+{
+ if (!(!strcmp(ee->driver, "opengl_x11"))) return 0;
+ Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
+ return edata->pixmap.visual;
+}
+
+static unsigned long
+_ecore_evas_gl_x11_pixmap_colormap_get(const Ecore_Evas *ee)
+{
+ if (!(!strcmp(ee->driver, "opengl_x11"))) return 0;
+ Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
+ return edata->pixmap.colormap;
+}
+
+static int
+_ecore_evas_gl_x11_pixmap_depth_get(const Ecore_Evas *ee)
+{
+ if (!(!strcmp(ee->driver, "opengl_x11"))) return 0;
+ Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
+ return edata->pixmap.depth;
+}
+
static void
_ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on)
{
@@ -4486,6 +4538,9 @@ _ecore_evas_x_interface_software_x11_new(void)
iface->resize_set = _ecore_evas_software_x11_direct_resize_set;
iface->resize_get = _ecore_evas_software_x11_direct_resize_get;
iface->extra_event_window_add =
_ecore_evas_software_x11_extra_event_window_add;
+ iface->pixmap_visual_get = _ecore_evas_software_x11_pixmap_visual_get;
+ iface->pixmap_colormap_get = _ecore_evas_software_x11_pixmap_colormap_get;
+ iface->pixmap_depth_get = _ecore_evas_software_x11_pixmap_depth_get;
return iface;
}
@@ -4509,6 +4564,9 @@ _ecore_evas_x_interface_gl_x11_new(void)
iface->resize_get = _ecore_evas_gl_x11_direct_resize_get;
iface->extra_event_window_add = _ecore_evas_gl_x11_extra_event_window_add;
iface->pre_post_swap_callback_set =
_ecore_evas_gl_x11_pre_post_swap_callback_set;
+ iface->pixmap_visual_get = _ecore_evas_gl_x11_pixmap_visual_get;
+ iface->pixmap_colormap_get = _ecore_evas_gl_x11_pixmap_colormap_get;
+ iface->pixmap_depth_get = _ecore_evas_gl_x11_pixmap_depth_get;
return iface;
}
--
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk