summaryrefslogtreecommitdiffstats
path: root/video/out/gl_cocoa.c
Commit message (Collapse)AuthorAgeFilesLines
* cocoa: fix fallback for OpenGL 2.1 hardware [2]Stefano Pigozzi2015-01-241-7/+13
| | | | Looks like it fails on context creation, not pixfmt creation.
* cocoa: fix fallback for OpenGL 2.1 hardwareStefano Pigozzi2015-01-241-25/+25
| | | | | | This was previously done in common code but now it's left to backends. Also remove the GL4 stuff since requesting a 3_2_Core context creates a 4.1 context here (wtf).
* cocoa: move the gl function loader to gl_cocoa.cStefano Pigozzi2014-12-281-1/+15
|
* cocoa: reintroduce async resizeStefano Pigozzi2014-10-181-0/+1
| | | | | | | After removing synchronous libdispatch calls, this looks like it doesn't deadlock anymore. I also experimented with pthread_mutex_trylock liek wm4 suggested, but it leads to some annoying black flickering. I will fallback to that only if some new deadlocks are discovered.
* cocoa: remove dead codeStefano Pigozzi2014-10-041-8/+0
|
* cocoa: move to a simpler threading modelStefano Pigozzi2014-10-041-1/+0
| | | | | | | | | | | | | | Unfortunately using dispatch_sync for synchronization turned out to be really bad for us. It caused a wide array of race conditions, deadlocks, etc. Moving to a very simple mutex. It's not clear to me how to do liveresizing with this, for now it just flickers with is unacceptable (maybe I'll draw black instead). This should fix all the threading cocoa bugs. Reopen if it's not the case! Fixes #751 Fixes #1129
* cocoa: fix compilation on OS X 10.8Stefano Pigozzi2014-07-141-0/+5
|
* cocoa: simplify logic that returns used bits per colorStefano Pigozzi2014-07-081-9/+1
|
* cocoa: move CGL context creation to gl_cocoaStefano Pigozzi2014-07-081-8/+98
| | | | | | This approach is similar to what other vo_opengl backends do. It can also be used in the future to create another cocoa backend that renders offscreen with IOSurfaces or FBOs.
* video/out: remove unused config() parameterswm42014-05-071-2/+1
| | | | This was cleaned up yesterday.
* cocoa: don't use VOCTRL_UPDATE_SCREENINFOwm42014-05-061-1/+1
|
* gl_common: remove unneeded callbackwm42013-11-141-1/+0
| | | | We got rid of this some time ago, but apparently not completely.
* cocoa_common: call gl_clear indirectlyStefano Pigozzi2013-09-281-0/+9
| | | | | | | glClear needs GL headers and we don't want those in `cocoa_common`. Create a callback in `gl_cocoa` and register it `cocoa_common`. Fixes #264
* gl_common: complete mp_msg conversionwm42013-09-121-1/+1
| | | | Hopefully this works on Wayland and Cocoa, which I didn't test.
* video/out: introduce vo_control for gl_common based VOswm42013-05-261-6/+1
| | | | | | | | | | | | | | | | Instead of having separate callbacks for each backend-handled feature (like MPGLContext.fullscreen, MPGLContext.border, etc.), pass the VOCTRL responsible for this directly to the backend. This allows removing a bunch of callbacks, that currently must be set even for optional/lesser features (like VOCTRL_BORDER). This requires changes to all VOs using gl_common, as well as all backends that support gl_common. Also introduce VOCTRL_CHECK_EVENTS. vo.check_events is now optional. VO backends can use VOCTRL_CHECK_EVENTS instead to implementing check_events. This has the advantage that the event handling code in VOs doesn't have to be duplicated if vo_control() is used.
* OSX: run native event loop in a separate threadStefano Pigozzi2013-05-121-0/+8
| | | | | | | | | | | | | | This commit is a followup on the previous one and uses a solution I like more since it totally decouples the Cocoa code from mpv's core and tries to emulate a generic Cocoa application's lifecycle as much as possible without fighting the framework. mpv's main is executed in a pthread while the main thread runs the native cocoa event loop. All of the thread safety is mainly accomplished with additional logic in cocoa_common as to not increase complexity on the crossplatform parts of the code.
* gl_common: split into platform specific fileswm42013-03-281-0/+67
Do this instead of stuffing all x11/cocoa/win32/wayland specific code into gl_common.c. The cocoa specific parts could probably go directly into cocoa_common.m, possibly same with wayland. Also redo how the list of backends is managed. Get rid of the GLTYPE_ constants. Instead of having a big switch() on GLTYPE_, each backend entry has a function pointer to setup the MPGLContext callback (e.g. mpgl_set_backend_x11()).