This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository efl.
View the commit online.
commit 2ff2f3315cdc2bbc5747731c20aa079140b04193
Author: Vincent Torri <[email protected]>
AuthorDate: Wed Oct 8 07:58:13 2025 +0200
Evas gl_win32: remove unused code
---
.../evas/engines/gl_win32/evas_win32_main.c | 210 ---------------------
1 file changed, 210 deletions(-)
diff --git a/src/modules/evas/engines/gl_win32/evas_win32_main.c b/src/modules/evas/engines/gl_win32/evas_win32_main.c
index 12afc516d3..c1e18051ac 100644
--- a/src/modules/evas/engines/gl_win32/evas_win32_main.c
+++ b/src/modules/evas/engines/gl_win32/evas_win32_main.c
@@ -122,216 +122,6 @@ _tls_context_set(GLContext ctx)
return eina_tls_set(_context_key, ctx);
}
-#if 0
-
-void *
-eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo)
-{
- Evas_GL_X11_Visual *evis;
- int alpha;
- int depth_bits;
- int stencil_bits;
- int msaa_samples;
- int config_attrs[40];
- int i;
- int num;
- Eina_Bool found;
-
- if (!einfo) return NULL;
- if (!einfo->info.display) return NULL;
-
- alpha = einfo->info.destination_alpha;
- depth_bits = alpha ? 32 : 24;
- stencil_bits = einfo->stencil_bits;
- msaa_samples = einfo->msaa_bits;
-
- evis->alpha = alpha;
-
- EGLDisplay *egl_disp;
- EGLConfig configs[200];
- int major_version, minor_version;
- const char *eglexts, *s;
- int depth = DefaultDepth(einfo->info.display, einfo->info.screen);
-
- /* detect GLES 3.x support */
- if (gles3_probed == EINA_FALSE)
- {
- gles3_probed = EINA_TRUE;
- eglexts = eglQueryString(egl_disp, EGL_EXTENSIONS);
- if (eglexts && strstr(eglexts, "EGL_KHR_create_context"))
- {
- int k, numconfigs = 0, value;
- EGLConfig *eglconfigs;
-
- if (eglGetConfigs(egl_disp, NULL, 0, &numconfigs) &&
- (numconfigs > 0))
- {
- eglconfigs = alloca(numconfigs * sizeof(EGLConfig));
- eglGetConfigs(egl_disp, eglconfigs, numconfigs, &numconfigs);
- for (k = 0; k < numconfigs; k++)
- {
- value = 0;
- if (eglGetConfigAttrib(egl_disp, eglconfigs[k], EGL_RENDERABLE_TYPE, &value) &&
- ((value & EGL_OPENGL_ES3_BIT_KHR) != 0) &&
- eglGetConfigAttrib(egl_disp, eglconfigs[k], EGL_SURFACE_TYPE, &value) &&
- ((value & EGL_WINDOW_BIT) != 0))
- {
- INF("OpenGL ES 3.x is supported!");
- gles3_supported = EINA_TRUE;
- break;
- }
- }
- }
- }
-
- if (gles3_supported &&
- ((s = getenv("EVAS_GL_DISABLE_GLES3")) && (atoi(s) == 1)))
- {
- INF("Disabling OpenGL ES 3.x support.");
- gles3_supported = EINA_FALSE;
- }
- }
-
- /* Find matching config & visual */
-try_again:
- i = 0;
- config_attrs[i++] = EGL_SURFACE_TYPE;
- config_attrs[i++] = EGL_WINDOW_BIT;
- config_attrs[i++] = EGL_RENDERABLE_TYPE;
- if (gles3_supported)
- config_attrs[i++] = EGL_OPENGL_ES3_BIT_KHR;
- else
- config_attrs[i++] = EGL_OPENGL_ES2_BIT;
- config_attrs[n++] = EGL_RED_SIZE;
- config_attrs[n++] = 1;
- config_attrs[n++] = EGL_GREEN_SIZE;
- config_attrs[n++] = 1;
- config_attrs[n++] = EGL_BLUE_SIZE;
- config_attrs[n++] = 1;
- config_attrs[i++] = EGL_ALPHA_SIZE;
- config_attrs[i++] = (alpha ? 1 : 0);
-
- if (depth_bits)
- {
- config_attrs[i++] = EGL_DEPTH_SIZE;
- config_attrs[i++] = depth_bits;
- }
-
- if (stencil_bits)
- {
- config_attrs[i++] = EGL_STENCIL_SIZE;
- config_attrs[i++] = stencil_bits;
- }
-
- if (msaa_samples)
- {
- config_attrs[i++] = EGL_SAMPLE_BUFFERS;
- config_attrs[i++] = 1;
- config_attrs[i++] = EGL_SAMPLES;
- config_attrs[i++] = msaa_samples;
- }
- config_attrs[i++] = EGL_NONE;
- num = 0;
- if ((!eglChooseConfig(egl_disp, config_attrs, configs, 200, &num))
- || (num < 1))
- {
- ERR("eglChooseConfig() can't find any configs (gles%d, alpha: %d, depth: %d, stencil: %d, msaa: %d)",
- gles3_supported ? 3 : 2, alpha, depth_bits, stencil_bits, msaa_samples);
- if ((depth_bits > 24) || (stencil_bits > 8))
- {
- WRN("Please note that your driver might not support 32-bit depth or "
- "16-bit stencil buffers, so depth24, stencil8 are the maximum "
- "recommended values.");
- if (depth_bits > 24) depth_bits = 24;
- if (stencil_bits > 8) stencil_bits = 8;
- DBG("Trying again with depth:%d, stencil:%d", depth_bits, stencil_bits);
- goto try_again;
- }
- else if (msaa_samples)
- {
- msaa_samples /= 2;
- DBG("Trying again with msaa_samples: %d", msaa_samples);
- goto try_again;
- }
- else if (depth_bits || stencil_bits)
- {
- depth_bits = 0;
- stencil_bits = 0;
- DBG("Trying again without any depth or stencil buffer");
- goto try_again;
- }
- free(evis);
- return NULL;
- }
- found = EINA_FALSE;
- for (i = 0; (i < num) && (!found); i++)
- {
- EGLint val = 0;
- VisualID visid = 0;
- XVisualInfo *xvi, vi_in;
- int nvi, j;
-
- if (!eglGetConfigAttrib(egl_disp, configs[i],
- EGL_NATIVE_VISUAL_ID, &val))
- continue;
- visid = val;
- vi_in.screen = einfo->info.screen;
- vi_in.visualid = visid;
- xvi = XGetVisualInfo(einfo->info.display,
- VisualScreenMask |
- VisualIDMask,
- &vi_in, &nvi);
- for (j = 0; j < nvi; j++)
- {
- if (!alpha)
- {
- if (xvi[j].depth == depth)
- {
- memcpy(&evis->info, &(xvi[j]), sizeof(XVisualInfo));
- evis->config = configs[i];
- found = EINA_TRUE;
- break;
- }
- }
- else
- {
- XRenderPictFormat *fmt;
-
- fmt = XRenderFindVisualFormat
- (einfo->info.display, xvi[j].visual);
- if ((fmt->direct.alphaMask > 0) &&
- (fmt->type == PictTypeDirect))
- {
- memcpy(&evis->info, &(xvi[j]), sizeof(XVisualInfo));
- evis->config = configs[i];
- found = EINA_TRUE;
- break;
- }
- }
- }
- if (xvi) XFree(xvi);
- }
- if (!found)
- {
- // this is a less correct fallback if the above fails to
- // find the right visuals/configs
- if (!alpha)
- {
- evis->config = configs[0];
- }
- else
- {
- XVisualInfo *xvi, vi_in;
- int nvi, j;
- XRenderPictFormat *fmt;
-
- evis->config = configs[0];
- }
- }
- return evis->info.visual;
-}
-#endif
-
static EGLDisplay *
_win32_eglGetDisplay(HDC dc)
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.