summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context_cocoa.c
Commit message (Collapse)AuthorAgeFilesLines
* osx: code cleanups and cosmetic fixesAkemi2018-01-201-1/+0
|
* Revert "cocoa: re-enable double buffering"James Ross-Gowan2017-09-221-1/+3
| | | | | | | | Enabling double buffering fixed some graphical glitches when entering fullscreen, but it also caused a fullscreen performance regression. We decided that the glitches were preferable to the performance regression. This reverts commit cee764849e4fe22b00fb3f31838a63906e2e0d54.
* cocoa: re-enable double bufferingJames Ross-Gowan2017-09-211-2/+1
| | | | | | | | | This causes a performance regression on 10.11 and newer, but the single buffered method was broken and could cause partially rendered frames to be presented to the screen. This reverts 9f30cd8292b4b7bfe5d7db29fe31a07cc76dec2c and e543853a7ff0ab4dcd4ccaf06c448013fd41c03a.
* vo_gpu: convert windows/osx hwdecs/contexts to new APIJames Ross-Gowan2017-09-211-23/+47
|
* vo_opengl: refactor into vo_gpuNiklas Haas2017-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done in several steps: 1. refactor MPGLContext -> struct ra_ctx 2. move GL-specific stuff in vo_opengl into opengl/context.c 3. generalize context creation to support other APIs, and add --gpu-api 4. rename all of the --opengl- options that are no longer opengl-specific 5. move all of the stuff from opengl/* that isn't GL-specific into gpu/ (note: opengl/gl_utils.h became opengl/utils.h) 6. rename vo_opengl to vo_gpu 7. to handle window screenshots, the short-term approach was to just add it to ra_swchain_fns. Long term (and for vulkan) this has to be moved to ra itself (and vo_gpu altered to compensate), but this was a stop-gap measure to prevent this commit from getting too big 8. move ra->fns->flush to ra_gl_ctx instead 9. some other minor changes that I've probably already forgotten Note: This is one half of a major refactor, the other half of which is provided by rossy's following commit. This commit enables support for all linux platforms, while his version enables support for all non-linux platforms. Note 2: vo_opengl_cb.c also re-uses ra_gl_ctx so it benefits from the --opengl- options like --opengl-early-flush, --opengl-finish etc. Should be a strict superset of the old functionality. Disclaimer: Since I have no way of compiling mpv on all platforms, some of these ports were done blindly. Specifically, the blind ports included context_mali_fbdev.c and context_rpi.c. Since they're both based on egl_helpers, the port should have gone smoothly without any major changes required. But if somebody complains about a compile error on those platforms (assuming anybody actually uses them), you know where to complain.
* cocoa: fix the support of multiple renderers (GPU switch)Alex Notes2017-07-311-6/+15
| | | | | | | | | | | | So far, switching between integrated and discrete GPU would cause the kernel to kill mpv due to an indecipherable buffer error. The technical note TN2229 from Apple recommends to enable OpenGL Offline Renderers for every Mac with more GPUs than displays to handle the switch between GPU. By ordering the array from the least commonly rejected to the most, we can sequentially remove PixelFormat attributes to fit the host. Fixes #2371
* cocoa: add option to force dedicated GPUAkemi2017-02-271-15/+32
| | | | Fixes #3242
* osx: drop support for OS X 10.7 and earlierAkemi2017-02-271-2/+0
|
* cocoa: add glFlush() to cocoa backendAkemi2016-10-061-0/+1
| | | | | | | | | | | | The glFlush() call was made optional recently since it's not needed in most cases. On OSX though this is needed since we removed kCGLPFADoubleBuffer from the context creation, so the glFlush() call was added to the cocoa backend only. The CGLFlushDrawable() call can be safely removed since it only does something when a double buffered context is used. Also fixes a small typo. Fixes #3627.
* cocoa: fix fullscreen regression on 10.11 and newerAkemi2016-09-261-1/+0
| | | | Fixes #3364.
* vo_opengl: use standard functions to retrieve display depthwm42016-06-141-9/+0
| | | | | | | | | | | | | Until now, we've used system-specific API (GLX, EGL, etc.) to retrieve the depth of the default framebuffer. (We equal this to display depth and use the determined depth for dithering.) We can actually retrieve this value through standard GL API, and it works everywhere (except GLES 2 of course). This simplifies everything a great deal. egl_helpers.c is empty now. But I expect that some EGL boilerplate will be moved to it, so don't remove it yet.
* vo_opengl: always premultiply alphawm42016-03-291-1/+0
| | | | | | Until now, we've let the windowing backend decide. But since they usually require premultiplied alpha, and premultiplied alpha is easier to handle, hardcode it.
* Change GPL/LGPL dual-licensed files to LGPLwm42016-01-191-12/+7
| | | | | | | | | | | Do this to make the license situation less confusing. This change should be of no consequence, since LGPL is compatible with GPL anyway, and making it LGPL-only does not restrict the use with GPL code. Additionally, the wording implies that this is allowed, and that we can just remove the GPL part.
* vo_opengl: cocoa: output premultiplied alphawm42015-12-191-0/+1
| | | | | Which is apparently what is expected here. (I'm pretty sure X11 compositors want stright alpha, so 2 code paths are needed.)
* vo_opengl: prefix per-backend source files with context_wm42015-12-191-0/+181