Path: blob/master/src/java.desktop/share/classes/sun/java2d/pipe/hw/AccelGraphicsConfig.java
41161 views
/*1* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.java2d.pipe.hw;2627import java.awt.image.VolatileImage;2829/**30* Implementors of this interface provida a way to create a31* {@code VolatileImage} whose destination surface is an32* {@link AccelSurface} of specified type.33*34* @see AccelSurface35*/36public interface AccelGraphicsConfig extends BufferedContextProvider {37/**38* Returns a VolatileImage with specified width, height, transparency39* and guaranteed accelerated surface type. If such image can not be created40* (out of vram error, specific surface type is not supported) null41* is returned.42*43* Note: if {@link AccelSurface#TEXTURE} type is requested, rendering44* to the image will be denied by throwing45* {@code UnsupportedOperationException }46* from {@link java.awt.image.VolatileImage#getGraphics} and47* {@link java.awt.image.VolatileImage#createGraphics}48*49* @param width the width of the returned {@code VolatileImage}50* @param height the height of the returned {@code VolatileImage}51* @param transparency the specified transparency mode52* @param type requested accelerated surface type as specified by constants53* in AccelSurface interface54* @return a {@code VolatileImage} backed up by requested accelerated55* surface type or null56* @throws IllegalArgumentException if the transparency is not a valid value57* @see AccelSurface#TEXTURE58* @see AccelSurface#RT_PLAIN59* @see AccelSurface#RT_TEXTURE60*/61public VolatileImage createCompatibleVolatileImage(int width, int height,62int transparency,63int type);64/**65* Returns object representing capabilities of the context associated66* with this {@code AccelGraphicsConfig}.67*68* @return ContextCapabilities object representing caps69* @see ContextCapabilities70*/71public ContextCapabilities getContextCapabilities();72}737475