Rev 6334 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6334 | Rev 6668 | ||
---|---|---|---|
Line 805... | Line 805... | ||
805 | 805 | ||
Line 806... | Line 806... | ||
806 | get_proc_info(proc_info); |
806 | get_proc_info(proc_info); |
807 | 807 | ||
808 | state = *(uint8_t*)(proc_info+70); |
808 | state = *(uint8_t*)(proc_info+70); |
Line 809... | Line 809... | ||
809 | if(state & (WIN_STATE_MINIMIZED|WIN_STATE_ROLLED)) |
809 | if(state & (WIN_STATE_MINIMIZED|WIN_STATE_ROLLED)) |
810 | return; |
810 | return 0; |
811 | 811 | ||
812 | winx = *(uint32_t*)(proc_info+34); |
812 | winx = *(uint32_t*)(proc_info+34); |
Line 813... | Line 813... | ||
813 | winy = *(uint32_t*)(proc_info+38); |
813 | winy = *(uint32_t*)(proc_info+38); |
814 | winw = *(uint32_t*)(proc_info+42)+1; |
814 | winw = *(uint32_t*)(proc_info+42)+1; |
815 | winh = *(uint32_t*)(proc_info+46)+1; |
815 | winh = *(uint32_t*)(proc_info+46)+1; |
816 | 816 | ||
817 | __builtin_memset(&fb, 0, sizeof(fb)); |
817 | __builtin_memset(&fb, 0, sizeof(fb)); |
818 | if( 0 != drm_ioctl(px->fd, SRV_FBINFO, &fb)) |
818 | if( 0 != drm_ioctl(px->fd, SRV_FBINFO, &fb)) |
Line 819... | Line 819... | ||
819 | { |
819 | { |
820 | DBG("failed to get framebuffer info\n"); |
820 | DBG("failed to get framebuffer info\n"); |
821 | return; |
821 | return 0; |
Line 828... | Line 828... | ||
828 | px->scr_height = fb.height; |
828 | px->scr_height = fb.height; |
Line 829... | Line 829... | ||
829 | 829 | ||
Line 830... | Line 830... | ||
830 | eglDestroyImageKHR(px->dpy, px->screen); |
830 | eglDestroyImageKHR(px->dpy, px->screen); |
831 | 831 | ||
832 | if(update_fb(px, fb.name, fb.pitch)) |
832 | if(update_fb(px, fb.name, fb.pitch)) |
Line 833... | Line 833... | ||
833 | return; |
833 | return 0; |
834 | }; |
834 | }; |
835 | 835 | ||
Line 841... | Line 841... | ||
841 | update.bo_pitch = (px->width+15) & ~15; |
841 | update.bo_pitch = (px->width+15) & ~15; |
842 | update.bo_map = (int)px->mask.buffer; |
842 | update.bo_map = (int)px->mask.buffer; |
Line 843... | Line 843... | ||
843 | 843 | ||
844 | if(drm_ioctl(px->fd, SRV_MASK_UPDATE_EX, &update)) |
844 | if(drm_ioctl(px->fd, SRV_MASK_UPDATE_EX, &update)) |
845 | { |
845 | { |
846 | return; |
846 | return 0; |
Line 847... | Line 847... | ||
847 | } |
847 | } |
848 | 848 | ||
Line 884... | Line 884... | ||
884 | 884 | ||
Line 885... | Line 885... | ||
885 | glDrawArrays(GL_TRIANGLE_FAN, 0, 4); |
885 | glDrawArrays(GL_TRIANGLE_FAN, 0, 4); |
Line 886... | Line 886... | ||
886 | 886 | ||
887 | glFlush(); |
887 | glFlush(); |
Line 888... | Line 888... | ||
888 | 888 | ||
889 | return; |
889 | return 0; |
890 | }; |
890 | }; |
Line 903... | Line 903... | ||
903 | 903 | ||
Line 904... | Line 904... | ||
904 | get_proc_info(proc_info); |
904 | get_proc_info(proc_info); |
905 | 905 | ||
906 | state = *(uint8_t*)(proc_info+70); |
906 | state = *(uint8_t*)(proc_info+70); |
Line 907... | Line 907... | ||
907 | if(state & (WIN_STATE_MINIMIZED|WIN_STATE_ROLLED)) |
907 | if(state & (WIN_STATE_MINIMIZED|WIN_STATE_ROLLED)) |
908 | return; |
908 | return 0; |
909 | 909 | ||
910 | winx = *(uint32_t*)(proc_info+34); |
910 | winx = *(uint32_t*)(proc_info+34); |
Line 911... | Line 911... | ||
911 | winy = *(uint32_t*)(proc_info+38); |
911 | winy = *(uint32_t*)(proc_info+38); |
912 | winw = *(uint32_t*)(proc_info+42)+1; |
912 | winw = *(uint32_t*)(proc_info+42)+1; |
913 | winh = *(uint32_t*)(proc_info+46)+1; |
913 | winh = *(uint32_t*)(proc_info+46)+1; |
914 | 914 | ||
915 | __builtin_memset(&fb, 0, sizeof(fb)); |
915 | __builtin_memset(&fb, 0, sizeof(fb)); |
916 | if( 0 != drm_ioctl(px->fd, SRV_FBINFO, &fb)) |
916 | if( 0 != drm_ioctl(px->fd, SRV_FBINFO, &fb)) |
Line 917... | Line 917... | ||
917 | { |
917 | { |
918 | DBG("failed to get framebuffer info\n"); |
918 | DBG("failed to get framebuffer info\n"); |
919 | return; |
919 | return 0; |
Line 926... | Line 926... | ||
926 | px->scr_height = fb.height; |
926 | px->scr_height = fb.height; |
Line 927... | Line 927... | ||
927 | 927 | ||
Line 928... | Line 928... | ||
928 | eglDestroyImageKHR(px->dpy, px->screen); |
928 | eglDestroyImageKHR(px->dpy, px->screen); |
929 | 929 | ||
930 | if(update_fb(px, fb.name, fb.pitch)) |
930 | if(update_fb(px, fb.name, fb.pitch)) |
Line 931... | Line 931... | ||
931 | return; |
931 | return 0; |
932 | }; |
932 | }; |
933 | 933 | ||
Line 939... | Line 939... | ||
939 | update.bo_pitch = (px->width+15) & ~15; |
939 | update.bo_pitch = (px->width+15) & ~15; |
940 | update.bo_map = (int)px->mask.buffer; |
940 | update.bo_map = (int)px->mask.buffer; |
Line 941... | Line 941... | ||
941 | 941 | ||
942 | if(drm_ioctl(px->fd, SRV_MASK_UPDATE_EX, &update)) |
942 | if(drm_ioctl(px->fd, SRV_MASK_UPDATE_EX, &update)) |
943 | { |
943 | { |
944 | return; |
944 | return 0; |
Line 945... | Line 945... | ||
945 | } |
945 | } |
946 | 946 | ||
Line 986... | Line 986... | ||
986 | 986 | ||
Line 987... | Line 987... | ||
987 | glDrawArrays(GL_TRIANGLE_FAN, 0, 4); |
987 | glDrawArrays(GL_TRIANGLE_FAN, 0, 4); |
Line 988... | Line 988... | ||
988 | 988 | ||
989 | glFlush(); |
989 | glFlush(); |
Line 990... | Line 990... | ||
990 | 990 | ||
991 | return; |
991 | return 0; |
992 | }; |
992 | }; |