src/java.desktop/unix/classes/sun/java2d/opengl/GLXGraphicsConfig.java
author serb
Fri, 13 Sep 2019 17:35:12 -0700
changeset 58324 0aba35254e00
parent 53673 e04d39094915
permissions -rw-r--r--
8229896: Delete an unused code in the BufferedContext Reviewed-by: prr, jdv
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
53673
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
     2
 * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1730
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1730
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1730
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1730
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1730
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.java2d.opengl;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.awt.AWTException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.awt.BufferCapabilities;
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    30
import java.awt.Color;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.awt.Component;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.awt.Graphics;
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    33
import java.awt.Graphics2D;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import java.awt.Image;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import java.awt.ImageCapabilities;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import java.awt.Transparency;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
import java.awt.color.ColorSpace;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import java.awt.image.BufferedImage;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import java.awt.image.ColorModel;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import java.awt.image.DataBuffer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import java.awt.image.DirectColorModel;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
import java.awt.image.VolatileImage;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
import java.awt.image.WritableRaster;
53673
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
    44
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
import sun.awt.X11ComponentPeer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
import sun.awt.X11GraphicsConfig;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
import sun.awt.X11GraphicsDevice;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
import sun.awt.X11GraphicsEnvironment;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
import sun.awt.image.OffScreenImage;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
import sun.awt.image.SunVolatileImage;
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    51
import sun.awt.image.SurfaceManager;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    52
import sun.java2d.SunGraphics2D;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    53
import sun.java2d.Surface;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
import sun.java2d.SurfaceData;
53673
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
    55
import sun.java2d.opengl.GLXSurfaceData.GLXVSyncOffScreenSurfaceData;
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    56
import sun.java2d.pipe.hw.AccelSurface;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    57
import sun.java2d.pipe.hw.AccelTypedVolatileImage;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    58
import sun.java2d.pipe.hw.ContextCapabilities;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
53673
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
    60
import static sun.java2d.opengl.OGLContext.OGLContextCaps;
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
    61
import static sun.java2d.opengl.OGLContext.OGLContextCaps.CAPS_DOUBLEBUFFERED;
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
    62
import static sun.java2d.opengl.OGLContext.OGLContextCaps.CAPS_EXT_FBOBJECT;
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
    63
import static sun.java2d.opengl.OGLSurfaceData.FBOBJECT;
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
    64
import static sun.java2d.opengl.OGLSurfaceData.TEXTURE;
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
    65
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
    66
public final class GLXGraphicsConfig
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    extends X11GraphicsConfig
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    implements OGLGraphicsConfig
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    private static ImageCapabilities imageCaps = new GLXImageCaps();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    private BufferCapabilities bufferCaps;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    private long pConfigInfo;
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    73
    private ContextCapabilities oglCaps;
58324
0aba35254e00 8229896: Delete an unused code in the BufferedContext
serb
parents: 53673
diff changeset
    74
    private final OGLContext context;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    private static native long getGLXConfigInfo(int screennum, int visualnum);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    private static native int getOGLCapabilities(long configInfo);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    private native void initConfig(long aData, long ctxinfo);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    private GLXGraphicsConfig(X11GraphicsDevice device, int visualnum,
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    81
                              long configInfo, ContextCapabilities oglCaps)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        super(device, visualnum, 0, 0,
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    84
              (oglCaps.getCaps() & CAPS_DOUBLEBUFFERED) != 0);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        pConfigInfo = configInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
        initConfig(getAData(), configInfo);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        this.oglCaps = oglCaps;
58324
0aba35254e00 8229896: Delete an unused code in the BufferedContext
serb
parents: 53673
diff changeset
    88
        context = new OGLContext(OGLRenderQueue.getInstance());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    91
    @Override
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    public Object getProxyKey() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        return this;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
    96
    @Override
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    public SurfaceData createManagedSurface(int w, int h, int transparency) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        return GLXSurfaceData.createData(this, w, h,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                                         getColorModel(transparency),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                                         null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
                                         OGLSurfaceData.TEXTURE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    public static GLXGraphicsConfig getConfig(X11GraphicsDevice device,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
                                              int visualnum)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        if (!X11GraphicsEnvironment.isGLXAvailable()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
            return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        long cfginfo = 0;
52248
2e330da7cbf4 8211300: Convert C-style array declarations in JDK client code
tvaleev
parents: 47216
diff changeset
   112
        final String[] ids = new String[1];
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        OGLRenderQueue rq = OGLRenderQueue.getInstance();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        rq.lock();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            // getGLXConfigInfo() creates and destroys temporary
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
            // surfaces/contexts, so we should first invalidate the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
            // Java-level context and flush the queue...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
            OGLContext.invalidateCurrentContext();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
            GLXGetConfigInfo action =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                new GLXGetConfigInfo(device.getScreen(), visualnum);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
            rq.flushAndInvokeNow(action);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
            cfginfo = action.getConfigInfo();
1730
2482c2865beb 6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
tdv
parents: 888
diff changeset
   124
            if (cfginfo != 0L) {
2482c2865beb 6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
tdv
parents: 888
diff changeset
   125
                OGLContext.setScratchSurface(cfginfo);
2482c2865beb 6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
tdv
parents: 888
diff changeset
   126
                rq.flushAndInvokeNow(new Runnable() {
2482c2865beb 6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
tdv
parents: 888
diff changeset
   127
                    public void run() {
2482c2865beb 6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
tdv
parents: 888
diff changeset
   128
                        ids[0] = OGLContext.getOGLIdString();
2482c2865beb 6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
tdv
parents: 888
diff changeset
   129
                    }
2482c2865beb 6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
tdv
parents: 888
diff changeset
   130
                });
2482c2865beb 6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
tdv
parents: 888
diff changeset
   131
            }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        } finally {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            rq.unlock();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        if (cfginfo == 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
        int oglCaps = getOGLCapabilities(cfginfo);
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   140
        ContextCapabilities caps = new OGLContextCaps(oglCaps, ids[0]);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   142
        return new GLXGraphicsConfig(device, visualnum, cfginfo, caps);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * This is a small helper class that allows us to execute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * getGLXConfigInfo() on the queue flushing thread.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    private static class GLXGetConfigInfo implements Runnable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        private int screen;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        private int visual;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        private long cfginfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        private GLXGetConfigInfo(int screen, int visual) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            this.screen = screen;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
            this.visual = visual;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        public void run() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
            cfginfo = getGLXConfigInfo(screen, visual);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        public long getConfigInfo() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
            return cfginfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * Returns true if the provided capability bit is present for this config.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * See OGLContext.java for a list of supported capabilities.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     */
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   169
    @Override
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    public final boolean isCapPresent(int cap) {
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   171
        return ((oglCaps.getCaps() & cap) != 0);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   174
    @Override
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    public final long getNativeConfigInfo() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        return pConfigInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   179
    @Override
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
    public final OGLContext getContext() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        return context;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    public BufferedImage createCompatibleImage(int width, int height) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        ColorModel model = new DirectColorModel(24, 0xff0000, 0xff00, 0xff);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        WritableRaster
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
            raster = model.createCompatibleWritableRaster(width, height);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        return new BufferedImage(model, raster, model.isAlphaPremultiplied(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
                                 null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
    public ColorModel getColorModel(int transparency) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
        switch (transparency) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        case Transparency.OPAQUE:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
            // REMIND: once the ColorModel spec is changed, this should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
            //         an opaque premultiplied DCM...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
            return new DirectColorModel(24, 0xff0000, 0xff00, 0xff);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        case Transparency.BITMASK:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
            return new DirectColorModel(25, 0xff0000, 0xff00, 0xff, 0x1000000);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        case Transparency.TRANSLUCENT:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
            ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
            return new DirectColorModel(cs, 32,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
                                        0xff0000, 0xff00, 0xff, 0xff000000,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
                                        true, DataBuffer.TYPE_INT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
            return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    public String toString() {
53673
e04d39094915 8214076: Cleanup the code related to GraphicsEnvironment/Device/Configuration
serb
parents: 52248
diff changeset
   213
        return ("GLXGraphicsConfig[dev="+getDevice()+
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
                ",vis=0x"+Integer.toHexString(visual)+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                "]");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     * The following methods are invoked from MToolkit or XToolkit.java and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
     * X11ComponentPeer.java rather than having the X11-dependent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     * implementations hardcoded in those classes.  This way the appropriate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     * actions are taken based on the peer's GraphicsConfig, whether it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * an X11GraphicsConfig or a GLXGraphicsConfig.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     * Creates a new SurfaceData that will be associated with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * X11ComponentPeer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
    public SurfaceData createSurfaceData(X11ComponentPeer peer) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        return GLXSurfaceData.createData(peer);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     * Creates a new hidden-acceleration image of the given width and height
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * that is associated with the target Component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
    public Image createAcceleratedImage(Component target,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
                                        int width, int height)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
        ColorModel model = getColorModel(Transparency.OPAQUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
        WritableRaster wr =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
            model.createCompatibleWritableRaster(width, height);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
        return new OffScreenImage(target, model, wr,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
                                  model.isAlphaPremultiplied());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
     * The following methods correspond to the multibuffering methods in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
     * X11ComponentPeer.java...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * Attempts to create a GLX-based backbuffer for the given peer.  If
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     * the requested configuration is not natively supported, an AWTException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     * is thrown.  Otherwise, if the backbuffer creation is successful, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     * value of 1 is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
    public long createBackBuffer(X11ComponentPeer peer,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
                                 int numBuffers, BufferCapabilities caps)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
        throws AWTException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
        if (numBuffers > 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
            throw new AWTException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
                "Only double or single buffering is supported");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
        BufferCapabilities configCaps = getBufferCapabilities();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
        if (!configCaps.isPageFlipping()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
            throw new AWTException("Page flipping is not supported");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
        if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
            throw new AWTException("FlipContents.PRIOR is not supported");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
        // non-zero return value means backbuffer creation was successful
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
        // (checked in X11ComponentPeer.flip(), etc.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
        return 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     * Destroys the backbuffer object represented by the given handle value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
    public void destroyBackBuffer(long backBuffer) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
     * Creates a VolatileImage that essentially wraps the target Component's
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
     * backbuffer (the provided backbuffer handle is essentially ignored).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
    public VolatileImage createBackBufferImage(Component target,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
                                               long backBuffer)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
        return new SunVolatileImage(target,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
                                    target.getWidth(), target.getHeight(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
                                    Boolean.TRUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
     * Performs the native GLX flip operation for the given target Component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
    public void flip(X11ComponentPeer peer,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
                     Component target, VolatileImage xBackBuffer,
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   309
                     int x1, int y1, int x2, int y2,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
                     BufferCapabilities.FlipContents flipAction)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
        if (flipAction == BufferCapabilities.FlipContents.COPIED) {
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   313
            SurfaceManager vsm = SurfaceManager.getManager(xBackBuffer);
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   314
            SurfaceData sd = vsm.getPrimarySurfaceData();
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   315
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   316
            if (sd instanceof GLXVSyncOffScreenSurfaceData) {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   317
                GLXVSyncOffScreenSurfaceData vsd =
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   318
                    (GLXVSyncOffScreenSurfaceData)sd;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   319
                SurfaceData bbsd = vsd.getFlipSurface();
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   320
                Graphics2D bbg =
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   321
                    new SunGraphics2D(bbsd, Color.black, Color.white, null);
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   322
                try {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   323
                    bbg.drawImage(xBackBuffer, 0, 0, null);
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   324
                } finally {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   325
                    bbg.dispose();
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   326
                }
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   327
            } else {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   328
                Graphics g = peer.getGraphics();
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   329
                try {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   330
                    g.drawImage(xBackBuffer,
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   331
                                x1, y1, x2, y2,
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   332
                                x1, y1, x2, y2,
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   333
                                null);
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   334
                } finally {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   335
                    g.dispose();
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   336
                }
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   337
                return;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
        } else if (flipAction == BufferCapabilities.FlipContents.PRIOR) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
            // not supported by GLX...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
            return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
        OGLSurfaceData.swapBuffers(peer.getContentWindow());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
        if (flipAction == BufferCapabilities.FlipContents.BACKGROUND) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
            Graphics g = xBackBuffer.getGraphics();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
                g.setColor(target.getBackground());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
                g.fillRect(0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
                           xBackBuffer.getWidth(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
                           xBackBuffer.getHeight());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
            } finally {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
                g.dispose();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
    private static class GLXBufferCaps extends BufferCapabilities {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
        public GLXBufferCaps(boolean dblBuf) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
            super(imageCaps, imageCaps,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
                  dblBuf ? FlipContents.UNDEFINED : null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
    public BufferCapabilities getBufferCapabilities() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
        if (bufferCaps == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
            bufferCaps = new GLXBufferCaps(isDoubleBuffered());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
        return bufferCaps;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
    private static class GLXImageCaps extends ImageCapabilities {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
        private GLXImageCaps() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
            super(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
        public boolean isTrueVolatile() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
            return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
    @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
    public ImageCapabilities getImageCapabilities() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
        return imageCaps;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
    }
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   387
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   388
    @Override
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   389
    public VolatileImage
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   390
        createCompatibleVolatileImage(int width, int height,
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   391
                                      int transparency, int type)
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   392
    {
31661
a5cb86f2253b 7188942: Remove support of pbuffers in OGL Java2d pipeline
serb
parents: 25859
diff changeset
   393
        if ((type != FBOBJECT && type != TEXTURE)
a5cb86f2253b 7188942: Remove support of pbuffers in OGL Java2d pipeline
serb
parents: 25859
diff changeset
   394
                || transparency == Transparency.BITMASK
a5cb86f2253b 7188942: Remove support of pbuffers in OGL Java2d pipeline
serb
parents: 25859
diff changeset
   395
                || type == FBOBJECT && !isCapPresent(CAPS_EXT_FBOBJECT)) {
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   396
            return null;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   397
        }
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   398
        SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   399
                                                          transparency, type);
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   400
        Surface sd = vi.getDestSurface();
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   401
        if (!(sd instanceof AccelSurface) ||
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   402
            ((AccelSurface)sd).getType() != type)
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   403
        {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   404
            vi.flush();
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   405
            vi = null;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   406
        }
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   407
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   408
        return vi;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   409
    }
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   410
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   411
    @Override
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   412
    public ContextCapabilities getContextCapabilities() {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   413
        return oglCaps;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 2
diff changeset
   414
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
}