2362N/A * Copyright (c) 2007, 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 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Holds all registered implementations, using the corresponding 0N/A * SunGraphics2D.PAINT_* constant as the hash key. 0N/A * Attempts to locate an implementation corresponding to the paint state 0N/A * of the provided SunGraphics2D object. If no implementation can be 0N/A * found, or if the paint cannot be accelerated under the conditions 0N/A * of the SunGraphics2D, this method returns false; otherwise, returns 0N/A * Returns true if this implementation is able to accelerate the 0N/A * Paint object associated with, and under the conditions of, the 0N/A * provided SunGraphics2D instance; otherwise returns false. 0N/A/************************* GradientPaint support ****************************/ 0N/A * There are no restrictions for accelerating GradientPaint, so 0N/A * this method always returns true. 0N/A/************************** TexturePaint support ****************************/ 0N/A * Returns true if the given TexturePaint instance can be used by the 0N/A * accelerated OGLPaints.Texture implementation. A TexturePaint is 0N/A * considered valid if the following conditions are met: 0N/A * - the texture image dimensions are power-of-two (or the 0N/A * GL_ARB_texture_non_power_of_two extension is present) 0N/A * - the texture image can be (or is already) cached in an OpenGL 0N/A // see if texture-non-pow2 extension is available 0N/A // verify that the texture image dimensions are pow2 0N/A // REMIND: this is a hack that attempts to cache the system 0N/A // memory image from the TexturePaint instance into an 0N/A // OpenGL texture... 0N/A // verify that the source surface is actually a texture 0N/A/****************** Shared MultipleGradientPaint support ********************/ 0N/A * Returns true if the given MultipleGradientPaint instance can be 0N/A * used by the accelerated OGLPaints.MultiGradient implementation. 0N/A * A MultipleGradientPaint is considered valid if the following 0N/A * conditions are met: 0N/A * - the number of gradient "stops" is <= MAX_FRACTIONS 0N/A * - the destination has support for fragment shaders 0N/A // REMIND: ugh, this creates garbage; would be nicer if 0N/A // we had a MultipleGradientPaint.getNumStops() method... 0N/A/********************** LinearGradientPaint support *************************/ 0N/A // we can delegate to the optimized two-color gradient 0N/A // codepath, which does not require fragment shader support 0N/A/********************** RadialGradientPaint support *************************/