1 /*
2 * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
660 D3DRQ_ResetCurrentContextAndDestination();
661 }
662 break;
663
664 case sun_java2d_pipe_BufferedOpCodes_SYNC:
665 {
666 bSync = TRUE;
667 }
668 break;
669
670 case sun_java2d_pipe_BufferedOpCodes_RESTORE_DEVICES:
671 {
672 J2dTraceLn(J2D_TRACE_INFO, "D3DRQ_FlushBuffer: RESTORE_DEVICES");
673 if (SUCCEEDED(res = pMgr->HandleLostDevices())) {
674 bLostDevices = FALSE;
675 } else {
676 bLostDevices = TRUE;
677 }
678 }
679 break;
680
681 case sun_java2d_pipe_BufferedOpCodes_SAVE_STATE:
682 {
683 CONTINUE_IF_NULL(d3dc);
684
685 res = d3dc->SaveState();
686 }
687 break;
688
689 case sun_java2d_pipe_BufferedOpCodes_RESTORE_STATE:
690 {
691 CONTINUE_IF_NULL(d3dc);
692
693 res = d3dc->RestoreState();
694 }
695 break;
696
697 // multibuffering ops
698 case sun_java2d_pipe_BufferedOpCodes_SWAP_BUFFERS:
699 {
700 jlong sdo = NEXT_LONG(b);
701 jint x1 = NEXT_INT(b);
702 jint y1 = NEXT_INT(b);
703 jint x2 = NEXT_INT(b);
704 jint y2 = NEXT_INT(b);
705
706 res = D3DRQ_SwapBuffers(pMgr, (D3DSDOps *)jlong_to_ptr(sdo),
707 x1, y1, x2, y2);
708 }
709 break;
710
711 // special no-op (mainly used for achieving 8-byte alignment)
712 case sun_java2d_pipe_BufferedOpCodes_NOOP:
713 break;
714
715 // paint-related ops
716 case sun_java2d_pipe_BufferedOpCodes_RESET_PAINT:
|
1 /*
2 * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
660 D3DRQ_ResetCurrentContextAndDestination();
661 }
662 break;
663
664 case sun_java2d_pipe_BufferedOpCodes_SYNC:
665 {
666 bSync = TRUE;
667 }
668 break;
669
670 case sun_java2d_pipe_BufferedOpCodes_RESTORE_DEVICES:
671 {
672 J2dTraceLn(J2D_TRACE_INFO, "D3DRQ_FlushBuffer: RESTORE_DEVICES");
673 if (SUCCEEDED(res = pMgr->HandleLostDevices())) {
674 bLostDevices = FALSE;
675 } else {
676 bLostDevices = TRUE;
677 }
678 }
679 break;
680 // multibuffering ops
681 case sun_java2d_pipe_BufferedOpCodes_SWAP_BUFFERS:
682 {
683 jlong sdo = NEXT_LONG(b);
684 jint x1 = NEXT_INT(b);
685 jint y1 = NEXT_INT(b);
686 jint x2 = NEXT_INT(b);
687 jint y2 = NEXT_INT(b);
688
689 res = D3DRQ_SwapBuffers(pMgr, (D3DSDOps *)jlong_to_ptr(sdo),
690 x1, y1, x2, y2);
691 }
692 break;
693
694 // special no-op (mainly used for achieving 8-byte alignment)
695 case sun_java2d_pipe_BufferedOpCodes_NOOP:
696 break;
697
698 // paint-related ops
699 case sun_java2d_pipe_BufferedOpCodes_RESET_PAINT:
|