| 782 | |
| 783 | |
| 784 | EGLSurface eglGetCurrentSurface(EGLint readdraw) |
| 785 | { |
| 786 | EGLSurface surface = 0, actualSurface = 0; |
| 787 | |
| 788 | TRY(); |
| 789 | |
| 790 | if(faker::getEGLExcludeCurrent() || !faker::getEGLXContextCurrent()) |
| 791 | return _eglGetCurrentSurface(readdraw); |
| 792 | |
| 793 | DISABLE_FAKER(); |
| 794 | |
| 795 | ///////////////////////////////////////////////////////////////////////////// |
| 796 | OPENTRACE(eglGetCurrentSurface); PRARGX(readdraw); STARTTRACE(); |
| 797 | ///////////////////////////////////////////////////////////////////////////// |
| 798 | |
| 799 | actualSurface = surface = _eglGetCurrentSurface(readdraw); |
| 800 | faker::EGLXVirtualWin *eglxvw = |
| 801 | EGLXWINHASH.findInternal(faker::getCurrentEGLXDisplay(), actualSurface); |
| 802 | if(eglxvw) surface = eglxvw->getDummySurface(); |
| 803 | |
| 804 | ///////////////////////////////////////////////////////////////////////////// |
| 805 | STOPTRACE(); PRARGX(surface); |
| 806 | if(surface != actualSurface) PRARGX(actualSurface); |
| 807 | CLOSETRACE(); |
| 808 | ///////////////////////////////////////////////////////////////////////////// |
| 809 | |
| 810 | CATCH(); |
| 811 | ENABLE_FAKER(); |
| 812 | return surface; |
| 813 | } |
| 814 | |
| 815 | |
| 816 | #define CREATE_DISPLAY() \ |
no test coverage detected