2362N/A * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * Used to track whether we are in a series of a simple primitive operations 0N/A * or texturing operations. This variable should be controlled only via 0N/A * OGLRenderQueue_CheckPreviousOp() method below for more information. 0N/A * References to the "current" context and destination surface. 0N/A * The following methods are implemented in the windowing system (i.e. GLX 0N/A * and WGL) source files. 0N/A "OGLRenderQueue_flushBuffer: limit=%d",
limit);
0N/A "OGLRenderQueue_flushBuffer: cannot get direct buffer address");
430N/A "OGLRenderQueue_flushBuffer: opcode=%d, rem=%d",
0N/A // Note that we could use GL_POINTS here, but the common 0N/A // use case for DRAW_PIXEL is when rendering a Path2D, 0N/A // which will consist of a mix of DRAW_PIXEL and DRAW_LINE 0N/A // calls. So to improve batching we use GL_LINES here, 0N/A // even though it requires an extra vertex per pixel. 0N/A // state-related ops 0N/A // context-related ops 0N/A // so we should nullify the current oglc and dstOps to avoid 0N/A // calling glFlush() (or similar) while no context is current 0N/A // flush just in case there are any pending operations in 0N/A // the hardware pipe 0N/A // invalidate the references to the current context and 0N/A // destination surface that are maintained at the native level 0N/A // multibuffering ops 0N/A // special no-op (mainly used for achieving 8-byte alignment) 0N/A // paint-related ops 0N/A // BufferedImageOp-related ops 0N/A "OGLRenderQueue_flushBuffer: invalid opcode=%d",
opcode);
0N/A * Returns a pointer to the "current" context, as set by the last SET_SURFACES 0N/A * or SET_SCRATCH_SURFACE operation. 0N/A * Returns a pointer to the "current" destination surface, as set by the last 0N/A * SET_SURFACES operation. 0N/A * Used to track whether we are within a series of simple primitive operations 0N/A * or texturing operations. The op parameter determines the nature of the 0N/A * operation that is to follow. Valid values for this op parameter are: 0N/A * (basically any of the valid parameters for glBegin()) 0N/A * GL_TEXTURE_RECTANGLE_ARB 0N/A * OGL_STATE_GLYPH_OP 0N/A * Note that the above constants are guaranteed to be unique values. The 0N/A * last few are defined to be negative values to differentiate them from 0N/A * the core GL* constants, which are defined to be non-negative. 0N/A * For simple primitives, this method allows us to batch similar primitives 0N/A * within the same glBegin()/glEnd() pair. For example, if we have 100 0N/A * consecutive FILL_RECT operations, we only have to call glBegin(GL_QUADS) 0N/A * for the first op, and then subsequent operations will consist only of 0N/A * glVertex*() calls, which helps improve performance. The glEnd() call 0N/A * only needs to be issued before an operation that cannot happen within a 0N/A * glBegin()/glEnd() pair (e.g. updating the clip), or one that requires a 0N/A * different primitive mode (e.g. GL_LINES). 0N/A * For operations that involve texturing, this method helps us to avoid 0N/A * calling glEnable(GL_TEXTURE_2D) and glDisable(GL_TEXTURE_2D) around each 0N/A * operation. For example, if we have an alternating series of ISO_BLIT 0N/A * and MASK_BLIT operations (both of which involve texturing), we need 0N/A * only to call glEnable(GL_TEXTURE_2D) before the first ISO_BLIT operation. 0N/A * The glDisable(GL_TEXTURE_2D) call only needs to be issued before an 0N/A * operation that cannot (or should not) happen while texturing is enabled 0N/A * (e.g. a context change, or a simple primitive operation like GL_QUADS). 0N/A // The op is the same as last time, so we can return immediately. 430N/A "OGLRenderQueue_CheckPreviousOp: new op=%d",
op);
0N/A // Optimization: Certain state changes (those marked as 0N/A // OGL_STATE_CHANGE) are allowed while texturing is enabled. 0N/A // In this case, we can allow previousOp to remain as it is and 0N/A // then return early. 0N/A // Otherwise, op must be a primitive operation, or a reset, so 0N/A // we will disable texturing. 0N/A // This next step of binding to zero should not be strictly 0N/A // necessary, but on some older Nvidia boards (e.g. GeForce 2) 0N/A // problems will arise if GL_TEXTURE_2D and 0N/A // GL_TEXTURE_RECTANGLE_ARB are bound at the same time, so we 0N/A // will do this just to be safe. 0N/A // In this case, op must be one of: 0N/A // - the start of a different primitive type (glBegin()) 0N/A // - a texturing operation 0N/A // - a state change (not allowed within glBegin()/glEnd() pairs) 0N/A // so we must first complete the previous primitive operation. 0N/A // We are starting a texturing operation, so enable texturing. 0N/A // We are starting a primitive operation, so call glBegin() with 0N/A // the given primitive type. 0N/A#
endif /* !HEADLESS */