jdk/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java
changeset 30469 bac0a7ff7e1e
parent 28234 f694f2576719
child 31661 a5cb86f2253b
equal deleted inserted replaced
30468:a016d2637922 30469:bac0a7ff7e1e
     1 /*
     1 /*
     2  * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    29 import static java.awt.BufferCapabilities.FlipContents.*;
    29 import static java.awt.BufferCapabilities.FlipContents.*;
    30 import java.awt.Component;
    30 import java.awt.Component;
    31 import java.awt.GraphicsConfiguration;
    31 import java.awt.GraphicsConfiguration;
    32 import java.awt.Transparency;
    32 import java.awt.Transparency;
    33 import java.awt.image.ColorModel;
    33 import java.awt.image.ColorModel;
       
    34 
       
    35 import sun.awt.AWTAccessor;
       
    36 import sun.awt.AWTAccessor.ComponentAccessor;
    34 import sun.awt.image.SunVolatileImage;
    37 import sun.awt.image.SunVolatileImage;
    35 import sun.awt.image.VolatileSurfaceManager;
    38 import sun.awt.image.VolatileSurfaceManager;
    36 import sun.awt.windows.WComponentPeer;
    39 import sun.awt.windows.WComponentPeer;
    37 import sun.java2d.SurfaceData;
    40 import sun.java2d.SurfaceData;
    38 import static sun.java2d.opengl.OGLContext.OGLContextCaps.*;
    41 import static sun.java2d.opengl.OGLContext.OGLContextCaps.*;
    71 
    74 
    72     /**
    75     /**
    73      * Create a pbuffer-based SurfaceData object (or init the backbuffer
    76      * Create a pbuffer-based SurfaceData object (or init the backbuffer
    74      * of an existing window if this is a double buffered GraphicsConfig).
    77      * of an existing window if this is a double buffered GraphicsConfig).
    75      */
    78      */
    76     @SuppressWarnings("deprecation")
       
    77     protected SurfaceData initAcceleratedSurface() {
    79     protected SurfaceData initAcceleratedSurface() {
    78         SurfaceData sData;
    80         SurfaceData sData;
    79         Component comp = vImg.getComponent();
    81         Component comp = vImg.getComponent();
    80         WComponentPeer peer =
    82         final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
    81             (comp != null) ? (WComponentPeer)comp.getPeer() : null;
    83         WComponentPeer peer = (comp != null) ? acc.getPeer(comp) : null;
    82 
    84 
    83         try {
    85         try {
    84             boolean createVSynced = false;
    86             boolean createVSynced = false;
    85             boolean forceback = false;
    87             boolean forceback = false;
    86             if (context instanceof Boolean) {
    88             if (context instanceof Boolean) {