2362N/A * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. 893N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 893N/A * This code is free software; you can redistribute it and/or modify it 893N/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 893N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 893N/A * This code is distributed in the hope that it will be useful, but WITHOUT 893N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 893N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 893N/A * version 2 for more details (a copy is included in the LICENSE file that 893N/A * accompanied this code). 893N/A * You should have received a copy of the GNU General Public License version 893N/A * 2 along with this work; if not, write to the Free Software Foundation, 893N/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 893N/A * Creates a new ShaderInfo that wraps the given fragment program handle 893N/A * and related data and stores it at the front of the provided ShaderList. 893N/A * If the addition causes the ShaderList to outgrow its defined capacity, 893N/A * the least-recently used item in the list (including its fragment program 1580N/A * object) will be disposed. 893N/A // create new ShaderInfo 893N/A "OGLContext_AddProgram: could not allocate ShaderInfo");
893N/A // fill in the information 893N/A // insert it at the head of the list 893N/A // run through the list and see if we need to delete the least 893N/A * Locates a fragment program handle given a list of shader programs 893N/A * (ShaderInfos), using the provided composite state and flags as search 893N/A * parameters. The "flags" parameter is a bitwise-or'd value that helps 893N/A * differentiate one program for another; the interpretation of this value 893N/A * varies depending on the type of shader (BufImgOp, Paint, etc) but here 893N/A * it is only used to find another ShaderInfo with that same "flags" value. 1580N/A * If no matching program can be located, this method returns 0. 893N/A // it's a match: move it to the front of the list (if it's not 893N/A // there already) and patch up the links 893N/A * Disposes all entries (and their associated shader program objects) 893N/A * contained in the given ShaderList.