2370N/A/*
2685N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2370N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2370N/A *
2370N/A * This code is free software; you can redistribute it and/or modify it
2370N/A * under the terms of the GNU General Public License version 2 only, as
2685N/A * published by the Free Software Foundation. Oracle designates this
2370N/A * particular file as subject to the "Classpath" exception as provided
2685N/A * by Oracle in the LICENSE file that accompanied this code.
2370N/A *
2370N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2370N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2370N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2370N/A * version 2 for more details (a copy is included in the LICENSE file that
2370N/A * accompanied this code).
2370N/A *
2370N/A * You should have received a copy of the GNU General Public License version
2370N/A * 2 along with this work; if not, write to the Free Software Foundation,
2370N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2370N/A *
2685N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2685N/A * or visit www.oracle.com if you need additional information or have any
2685N/A * questions.
2370N/A */
2370N/A
2370N/A/*
2370N/A * To change this template, choose Tools | Templates
2370N/A * and open the template in the editor.
2370N/A */
2370N/A
2370N/Apackage sun.java2d.xr;
2370N/A
2370N/Aimport sun.awt.*;
2370N/Aimport sun.awt.image.*;
2370N/Aimport sun.java2d.*;
2370N/A
2370N/Apublic class XRGraphicsConfig extends X11GraphicsConfig implements
2370N/A SurfaceManager.ProxiedGraphicsConfig {
2370N/A private XRGraphicsConfig(X11GraphicsDevice device, int visualnum,
2370N/A int depth, int colormap, boolean doubleBuffer) {
2370N/A super(device, visualnum, depth, colormap, doubleBuffer);
2370N/A }
2370N/A
2370N/A public SurfaceData createSurfaceData(X11ComponentPeer peer) {
2370N/A return XRSurfaceData.createData(peer);
2370N/A }
2370N/A
2370N/A public static XRGraphicsConfig getConfig(X11GraphicsDevice device,
2370N/A int visualnum, int depth, int colormap, boolean doubleBuffer) {
2370N/A if (!X11GraphicsEnvironment.isXRenderAvailable()) {
2370N/A return null;
2370N/A }
2370N/A
2370N/A return new XRGraphicsConfig(device, visualnum, depth, colormap,
2370N/A doubleBuffer);
2370N/A }
2370N/A
2370N/A public Object getProxyKey() {
2370N/A return this;
2370N/A }
2370N/A}