1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00
mpv/osdep
Akemi c5e4538bc4 cocoa-cb: initial implementation via opengl-cb API
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend in the future. the problems are various shortcomings of
Apple's opengl implementation and buggy behaviour in certain
circumstances that couldn't be properly worked around. there are also
certain regressions on newer macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

all the problems were caused by using a normal opengl context, that
seems somewhat abandoned by apple, and are fixed by using a layer backed
opengl context instead. problems that couldn't be fixed could be
properly worked around.

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
and it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: #5478, #5393, #5152, #5151, #4615, #4476, #3978, #3746, #3739,
#2392, #2217
2018-02-12 04:49:15 -08:00
..
android android: posix_spawn(p) replacement 2017-09-22 09:24:19 +02:00
ar Fix misspellings 2016-06-26 13:47:21 +02:00
win32 win32: fix massive memory corruption (take 2) 2017-08-21 18:42:04 +02:00
atomic.h ao: simplify hack for float atomics 2017-11-30 01:20:03 +01:00
compiler.h osdep/compiler.h: change license to LGPL 2017-05-08 13:11:46 +02:00
endian.h audio: drop swapped-endian audio formats 2014-09-23 23:09:25 +02:00
glob-win.c Universal Windows Plaform (UWP) support 2017-06-29 10:36:16 +02:00
io.c win32: fix semantics of POSIX 2008 locale stubs 2017-11-19 21:10:56 +11:00
io.h win32: fix semantics of POSIX 2008 locale stubs 2017-11-19 21:10:56 +11:00
macOS_mpv_helper.swift cocoa-cb: initial implementation via opengl-cb API 2018-02-12 04:49:15 -08:00
macOS_swift_bridge.h cocoa-cb: initial implementation via opengl-cb API 2018-02-12 04:49:15 -08:00
macosx_application_objc.h cocoa-cb: initial implementation via opengl-cb API 2018-02-12 04:49:15 -08:00
macosx_application.h osx: move menu bar creation into its own file 2017-08-18 19:20:41 +02:00
macosx_application.m cocoa-cb: initial implementation via opengl-cb API 2018-02-12 04:49:15 -08:00
macosx_compat.h osx: fix macOS 10.13 deprecation warning 2018-01-20 14:43:49 -08:00
macosx_events_objc.h osx: code cleanups and cosmetic fixes 2018-01-20 14:43:49 -08:00
macosx_events.h osx: code cleanups and cosmetic fixes 2018-01-20 14:43:49 -08:00
macosx_events.m cocoa-cb: initial implementation via opengl-cb API 2018-02-12 04:49:15 -08:00
macosx_menubar_objc.h osx: refactor menu bar creation 2017-08-18 19:20:41 +02:00
macosx_menubar.h osx: move menu bar creation into its own file 2017-08-18 19:20:41 +02:00
macosx_menubar.m cocoa-cb: initial implementation via opengl-cb API 2018-02-12 04:49:15 -08:00
macosx_touchbar.h osx: change license of OSX and cocoa files to LGPL 2017-06-24 16:29:22 +02:00
macosx_touchbar.m osx: change license of OSX and cocoa files to LGPL 2017-06-24 16:29:22 +02:00
macosx_versions.h osx: change license of OSX and cocoa files to LGPL 2017-06-24 16:29:22 +02:00
main-fn-cocoa.c build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
main-fn-unix.c build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
main-fn-win.c player: do not let pseudo-gui override user config settings 2016-09-23 21:24:50 +02:00
main-fn.h build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
mpv.exe.manifest win32: add Windows 10 compatibility GUID 2015-12-20 21:06:02 +11:00
mpv.rc mpv.rc: readd actual version info 2018-01-01 21:44:01 +00:00
path-macosx.m osx: fix bundle on macOS High Sierra (10.13) 2017-10-03 11:30:56 +02:00
path-unix.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
path-uwp.c Universal Windows Plaform (UWP) support 2017-06-29 10:36:16 +02:00
path-win.c win32: build with -DINITGUID 2016-09-28 21:38:52 +10:00
path.h Universal Windows Plaform (UWP) support 2017-06-29 10:36:16 +02:00
polldev.c osdep: add poll shim for macOS 2017-12-09 21:11:46 +02:00
polldev.h osdep: add poll shim for macOS 2017-12-09 21:11:46 +02:00
posix-spawn.h android: posix_spawn(p) replacement 2017-09-22 09:24:19 +02:00
semaphore_osx.c Fix use of ISC license 2017-04-15 16:20:00 +02:00
semaphore.h osdep: hack to fix build with low quality pthreads-w32 headers 2014-09-20 04:18:40 +02:00
strnlen.h Initial Android support 2016-02-10 21:29:36 +01:00
subprocess-dummy.c build: change how some OS specific source files are selected 2017-06-29 10:30:16 +02:00
subprocess-posix.c android: posix_spawn(p) replacement 2017-09-22 09:24:19 +02:00
subprocess-win.c subprocess-win: don't change the mouse cursor in CreateProcess 2017-12-14 21:35:55 +11:00
subprocess.c build: change how some OS specific source files are selected 2017-06-29 10:30:16 +02:00
subprocess.h subprocess: add a callback to ignore output 2016-07-05 19:15:59 +02:00
terminal-dummy.c build: change how some OS specific source files are selected 2017-06-29 10:30:16 +02:00
terminal-unix.c terminal-unix: fix race condition with tty reset 2017-12-09 21:37:44 +02:00
terminal-win.c terminal: remove unused return value 2017-06-27 18:08:56 +02:00
terminal.h terminal: remove unused return value 2017-06-27 18:08:56 +02:00
threads.c Revert "osdep: NetBSD pthread_setname_np()" 2017-06-22 13:17:40 +02:00
threads.h threads: use utility+POSIX functions instead of weird wrappers 2015-05-11 23:44:36 +02:00
timer-darwin.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
timer-linux.c build: remove nanosleep() check 2017-12-02 23:29:40 +01:00
timer-win2.c Universal Windows Plaform (UWP) support 2017-06-29 10:36:16 +02:00
timer.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
timer.h osdep/timer*: change license to LGPL 2017-05-05 12:35:57 +02:00
w32_keyboard.c w32_common: handle media keys 2017-08-05 02:38:44 +10:00
w32_keyboard.h w32_common: handle media keys 2017-08-05 02:38:44 +10:00
win32-console-wrapper.c win32: fix some Clang warnings 2016-11-17 23:34:20 +11:00
windows_utils.c vo_opengl: angle: rewrite with custom swap chain 2017-02-07 22:45:07 +11:00
windows_utils.h win32: add COM-specific SAFE_RELEASE to windows_utils.h 2017-01-30 00:22:30 +11:00