Check-in [fa9b707021]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge with trunk
Timelines: family | ancestors | descendants | both | wtf-8-experiment
Files: files | file ages | folders
SHA1:fa9b707021d1b7e4f417c54cfc31f2179ef21cf2
User & Date: chw 2019-04-14 17:00:36
Context
2019-04-16
18:40
merge with trunk check-in: 4f5ca5f606 user: chw tags: wtf-8-experiment
2019-04-14
17:00
merge with trunk check-in: fa9b707021 user: chw tags: wtf-8-experiment
16:59
rgb masks in visual on win32, again check-in: 60b57398a4 user: chw tags: trunk
2019-04-13
06:53
merge with trunk check-in: a7259ebe61 user: chw tags: wtf-8-experiment
Changes

Changes to jni/SDL2/src/video/SDL_egl.c.

435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
    } else {
        *_this->gl_config.driver_path = '\0';
    }
    
    return 0;
}

static int
SDL_EGL_ChooseConfigEx(_THIS, SDL_bool pbuffer) 
{
/* 64 seems nice. */
    EGLint attribs[64];
    EGLint found_configs = 0, value;
#ifdef SDL_VIDEO_DRIVER_KMSDRM
    /* Intel EGL on KMS/DRM (al least) returns invalid configs that confuse the bitdiff search used */







|







435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
    } else {
        *_this->gl_config.driver_path = '\0';
    }
    
    return 0;
}

int
SDL_EGL_ChooseConfigEx(_THIS, SDL_bool pbuffer) 
{
/* 64 seems nice. */
    EGLint attribs[64];
    EGLint found_configs = 0, value;
#ifdef SDL_VIDEO_DRIVER_KMSDRM
    /* Intel EGL on KMS/DRM (al least) returns invalid configs that confuse the bitdiff search used */

Changes to jni/SDL2/src/video/SDL_egl_c.h.

97
98
99
100
101
102
103

104
105
106
107
108
109
110
extern int SDL_EGL_GetAttribute(_THIS, SDL_GLattr attrib, int *value);
/* SDL_EGL_LoadLibrary can get a display for a specific platform (EGL_PLATFORM_*)
 * or, if 0 is passed, let the implementation decide.
 */
extern int SDL_EGL_LoadLibrary(_THIS, const char *path, NativeDisplayType native_display, EGLenum platform);
extern void *SDL_EGL_GetProcAddress(_THIS, const char *proc);
extern void SDL_EGL_UnloadLibrary(_THIS);

extern int SDL_EGL_ChooseConfig(_THIS);
extern int SDL_EGL_SetSwapInterval(_THIS, int interval);
extern int SDL_EGL_GetSwapInterval(_THIS);
extern void SDL_EGL_DeleteContext(_THIS, SDL_GLContext context);
extern EGLSurface *SDL_EGL_CreateSurface(_THIS, NativeWindowType nw);
extern EGLSurface *SDL_EGL_CreatePbufferSurface(_THIS, int width, int height);
extern void SDL_EGL_DestroySurface(_THIS, EGLSurface egl_surface);







>







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
extern int SDL_EGL_GetAttribute(_THIS, SDL_GLattr attrib, int *value);
/* SDL_EGL_LoadLibrary can get a display for a specific platform (EGL_PLATFORM_*)
 * or, if 0 is passed, let the implementation decide.
 */
extern int SDL_EGL_LoadLibrary(_THIS, const char *path, NativeDisplayType native_display, EGLenum platform);
extern void *SDL_EGL_GetProcAddress(_THIS, const char *proc);
extern void SDL_EGL_UnloadLibrary(_THIS);
extern int SDL_EGL_ChooseConfigEx(_THIS, SDL_bool pbuffer);
extern int SDL_EGL_ChooseConfig(_THIS);
extern int SDL_EGL_SetSwapInterval(_THIS, int interval);
extern int SDL_EGL_GetSwapInterval(_THIS);
extern void SDL_EGL_DeleteContext(_THIS, SDL_GLContext context);
extern EGLSurface *SDL_EGL_CreateSurface(_THIS, NativeWindowType nw);
extern EGLSurface *SDL_EGL_CreatePbufferSurface(_THIS, int width, int height);
extern void SDL_EGL_DestroySurface(_THIS, EGLSurface egl_surface);

Changes to jni/SDL2/src/video/jsmpeg/SDL_jsmpeg.c.

768
769
770
771
772
773
774


















775
776
777
778
779
780



781
782
783
784
785
786
787
....
1277
1278
1279
1280
1281
1282
1283

1284
1285

1286
1287
1288
1289
1290
1291
1292
    context = SDL_EGL_CreateContext(_this, data->egl_surface);
    return context;
}

static int
JSMPEG_GL_LoadLibrary(_THIS, const char *path)
{


















    if (SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0) < 0) {
        SDL_EGL_UnloadLibrary(_this);
        return -1;
    }
    SDL_EGL_ChooseConfig(_this);
    return 0;



}

#elif SDL_VIDEO_OPENGL_WGL

extern LPTSTR SDL_Appname;
extern HINSTANCE SDL_Instance;

................................................................................
    if (data == NULL) {
        return SDL_OutOfMemory();
    }

#if SDL_VIDEO_OPENGL_EGL
    if (!_this->egl_data) {
        if (SDL_GL_LoadLibrary(NULL) < 0) {

            SDL_free(data);
            return -1;

        }
    }
    if ((window->flags & SDL_WINDOW_OPENGL) || hidden) {
        if (!_this->egl_data) {
            SDL_free(data);
            SDL_SetError("no EGL support available");
            return -1;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




|
|
>
>
>







 







>
|
|
>







768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
....
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
    context = SDL_EGL_CreateContext(_this, data->egl_surface);
    return context;
}

static int
JSMPEG_GL_LoadLibrary(_THIS, const char *path)
{
#if 0
    /*
     * This would be the way to go real headless: hard wire the
     * EGL_PLATFORM=surfaceless but it seems that the current
     * mesa-libEGL is buggy and crashes in eglCreatePbufferSurface().
     */

#ifndef EGL_PLATFORM_SURFACELESS_MESA
#define EGL_PLATFORM_SURFACELESS_MESA 0x31DD
#endif

    if (SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, EGL_PLATFORM_SURFACELESS_MESA) == 0) {
        if (SDL_EGL_ChooseConfigEx(_this, SDL_TRUE) == 0) {
            return 0;
        }
    }
    SDL_EGL_UnloadLibrary(_this);
#endif
    if (SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0) < 0) {
        SDL_EGL_UnloadLibrary(_this);
        return -1;
    }
    if (SDL_EGL_ChooseConfigEx(_this, SDL_TRUE) == 0) {
        return 0;
    }
    SDL_EGL_UnloadLibrary(_this);
    return -1;
}

#elif SDL_VIDEO_OPENGL_WGL

extern LPTSTR SDL_Appname;
extern HINSTANCE SDL_Instance;

................................................................................
    if (data == NULL) {
        return SDL_OutOfMemory();
    }

#if SDL_VIDEO_OPENGL_EGL
    if (!_this->egl_data) {
        if (SDL_GL_LoadLibrary(NULL) < 0) {
            if (window->flags & SDL_WINDOW_OPENGL) {
                SDL_free(data);
                return -1;
            }
        }
    }
    if ((window->flags & SDL_WINDOW_OPENGL) || hidden) {
        if (!_this->egl_data) {
            SDL_free(data);
            SDL_SetError("no EGL support available");
            return -1;

Changes to jni/sdl2tk/win/tkWinX.c.

505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
	screen->root_visual->map_entries = 16;
    } else if (screen->root_depth == 8) {
	screen->root_visual->class = StaticColor;
	screen->root_visual->map_entries = 256;
    } else if (screen->root_depth == 12) {
	screen->root_visual->class = TrueColor;
	screen->root_visual->map_entries = 32;
	screen->root_visual->red_mask = 0xf00000;
	screen->root_visual->green_mask = 0xf000;
	screen->root_visual->blue_mask = 0xf0;
    } else if (screen->root_depth == 16) {
	screen->root_visual->class = TrueColor;
	screen->root_visual->map_entries = 64;
	screen->root_visual->red_mask = 0xf80000;
	screen->root_visual->green_mask = 0xfc00;
	screen->root_visual->blue_mask = 0xf8;
    } else if (screen->root_depth >= 24) {
	screen->root_visual->class = TrueColor;
	screen->root_visual->map_entries = 256;
	screen->root_visual->red_mask = 0xff0000;
	screen->root_visual->green_mask = 0xff00;
	screen->root_visual->blue_mask = 0xff;
    }
    screen->root_visual->bits_per_rgb = screen->root_depth;
    ReleaseDC(NULL, dc);

    if (screen->cmap != None) {
	XFreeColormap(display, screen->cmap);
    }







|

|



|

|



|

|







505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
	screen->root_visual->map_entries = 16;
    } else if (screen->root_depth == 8) {
	screen->root_visual->class = StaticColor;
	screen->root_visual->map_entries = 256;
    } else if (screen->root_depth == 12) {
	screen->root_visual->class = TrueColor;
	screen->root_visual->map_entries = 32;
	screen->root_visual->red_mask = 0xf0;
	screen->root_visual->green_mask = 0xf000;
	screen->root_visual->blue_mask = 0xf00000;
    } else if (screen->root_depth == 16) {
	screen->root_visual->class = TrueColor;
	screen->root_visual->map_entries = 64;
	screen->root_visual->red_mask = 0xf8;
	screen->root_visual->green_mask = 0xfc00;
	screen->root_visual->blue_mask = 0xf80000;
    } else if (screen->root_depth >= 24) {
	screen->root_visual->class = TrueColor;
	screen->root_visual->map_entries = 256;
	screen->root_visual->red_mask = 0xff;
	screen->root_visual->green_mask = 0xff00;
	screen->root_visual->blue_mask = 0xff0000;
    }
    screen->root_visual->bits_per_rgb = screen->root_depth;
    ReleaseDC(NULL, dc);

    if (screen->cmap != None) {
	XFreeColormap(display, screen->cmap);
    }

Changes to jni/tclJBlend/src/javaDetect.tcl.

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
		    }
		}
		aarch64 {
		    if {$::tcl_platform(pointerSize) < 8} {
			set arch *arm*
			lappend libs /usr/lib/jvm
		    } else {
			set arch *aarch64*
			lappend libs /usr/lib64/jvm /usr/lib/jvm
		    }
		}
		default {
		    set arch *
		    lappend libs /usr/lib/jvm
		}







|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
		    }
		}
		aarch64 {
		    if {$::tcl_platform(pointerSize) < 8} {
			set arch *arm*
			lappend libs /usr/lib/jvm
		    } else {
			set arch [list *aarch64* *arm64*]
			lappend libs /usr/lib64/jvm /usr/lib/jvm
		    }
		}
		default {
		    set arch *
		    lappend libs /usr/lib/jvm
		}