jdk/src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java
author martin
Thu, 30 Oct 2014 07:31:41 -0700
changeset 28059 e576535359cc
parent 25859 3317bb8137f4
child 40991 24c96f117cf5
permissions -rw-r--r--
8067377: My hobby: caning, then then canning, the the can-can Summary: Fix ALL the stutters! Reviewed-by: rriggs, mchung, lancea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
     1
/*
23272
0e0103e73d3c 8032435: Cleanup of sun.awt.windows package
serb
parents: 11271
diff changeset
     2
 * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
     4
 *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
597df8e1d786 6633275: Need to support shaped/translucent windows
art
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: 2808
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2808
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    10
 *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    15
 * accompanied this code).
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    16
 *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2808
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2808
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2808
diff changeset
    23
 * questions.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    24
 */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    25
package sun.awt.windows;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    26
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    27
import java.awt.AlphaComposite;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    28
import java.awt.Color;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    29
import java.awt.Graphics2D;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    30
import java.awt.GraphicsConfiguration;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    31
import java.awt.Image;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    32
import java.awt.Window;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    33
import java.awt.image.BufferedImage;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    34
import java.awt.image.DataBufferInt;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    35
import java.awt.image.VolatileImage;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    36
import java.security.AccessController;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    37
import sun.awt.image.BufImgSurfaceData;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    38
import sun.java2d.DestSurfaceProvider;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    39
import sun.java2d.InvalidPipeException;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    40
import sun.java2d.Surface;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    41
import sun.java2d.pipe.RenderQueue;
11271
f10f98b24801 7117011: Reduce number of warnings in sun/awt/windows and sun/awt/datatransfer
denis
parents: 5506
diff changeset
    42
import sun.java2d.pipe.BufferedContext;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    43
import sun.java2d.pipe.hw.AccelGraphicsConfig;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    44
import sun.java2d.pipe.hw.AccelSurface;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    45
import sun.security.action.GetPropertyAction;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    46
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    47
import static java.awt.image.VolatileImage.*;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    48
import static sun.java2d.pipe.hw.AccelSurface.*;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    49
import static sun.java2d.pipe.hw.ContextCapabilities.*;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    50
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    51
/**
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    52
 * This class handles the updates of the non-opaque windows.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    53
 * The window associated with the peer is updated either given an image or
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    54
 * the window is repainted to an internal buffer which is then used to update
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    55
 * the window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    56
 *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    57
 * Note: this class does not attempt to be thread safe, it is expected to be
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    58
 * called from a single thread (EDT).
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    59
 */
23272
0e0103e73d3c 8032435: Cleanup of sun.awt.windows package
serb
parents: 11271
diff changeset
    60
abstract class TranslucentWindowPainter {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    61
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    62
    protected Window window;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    63
    protected WWindowPeer peer;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    64
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    65
    // REMIND: we probably would want to remove this later
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    66
    private static final boolean forceOpt  =
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    67
        Boolean.valueOf(AccessController.doPrivileged(
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    68
            new GetPropertyAction("sun.java2d.twp.forceopt", "false")));
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    69
    private static final boolean forceSW  =
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    70
        Boolean.valueOf(AccessController.doPrivileged(
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    71
            new GetPropertyAction("sun.java2d.twp.forcesw", "false")));
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    72
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    73
    /**
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    74
     * Creates an instance of the painter for particular peer.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    75
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    76
    public static TranslucentWindowPainter createInstance(WWindowPeer peer) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    77
        GraphicsConfiguration gc = peer.getGraphicsConfiguration();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    78
        if (!forceSW && gc instanceof AccelGraphicsConfig) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    79
            String gcName = gc.getClass().getSimpleName();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    80
            AccelGraphicsConfig agc = (AccelGraphicsConfig)gc;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    81
            // this is a heuristic to check that we have a pcix board
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    82
            // (those have higher transfer rate from gpu to cpu)
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    83
            if ((agc.getContextCapabilities().getCaps() & CAPS_PS30) != 0 ||
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    84
                forceOpt)
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    85
            {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    86
                // we check for name to avoid loading classes unnecessarily if
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    87
                // a pipeline isn't enabled
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    88
                if (gcName.startsWith("D3D")) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    89
                    return new VIOptD3DWindowPainter(peer);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    90
                } else if (forceOpt && gcName.startsWith("WGL")) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    91
                    // on some boards (namely, ATI, even on pcix bus) ogl is
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    92
                    // very slow reading pixels back so for now it is disabled
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    93
                    // unless forced
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    94
                    return new VIOptWGLWindowPainter(peer);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    95
                }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    96
            }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    97
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    98
        return new BIWindowPainter(peer);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
    99
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   100
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   101
    protected TranslucentWindowPainter(WWindowPeer peer) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   102
        this.peer = peer;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   103
        this.window = (Window)peer.getTarget();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   104
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   105
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   106
    /**
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   107
     * Creates (if needed), clears (if requested) and returns the buffer
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   108
     * for this painter.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   109
     */
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   110
    protected abstract Image getBackBuffer(boolean clear);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   111
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   112
    /**
28059
e576535359cc 8067377: My hobby: caning, then then canning, the the can-can
martin
parents: 25859
diff changeset
   113
     * Updates the window associated with this painter with the contents
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   114
     * of the passed image.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   115
     * The image can not be null, and NPE will be thrown if it is.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   116
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   117
    protected abstract boolean update(Image bb);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   118
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   119
    /**
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   120
     * Flushes the resources associated with the painter. They will be
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   121
     * recreated as needed.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   122
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   123
    public abstract void flush();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   124
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   125
    /**
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   126
     * Updates the window associated with the painter.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   127
     *
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   128
     * @param repaint indicates if the window should be completely repainted
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   129
     * to the back buffer using {@link java.awt.Window#paintAll} before update.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   130
     */
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   131
    public void updateWindow(boolean repaint) {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   132
        boolean done = false;
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   133
        Image bb = getBackBuffer(repaint);
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   134
        while (!done) {
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   135
            if (repaint) {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   136
                Graphics2D g = (Graphics2D)bb.getGraphics();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   137
                try {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   138
                    window.paintAll(g);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   139
                } finally {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   140
                    g.dispose();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   141
                }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   142
            }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   143
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   144
            done = update(bb);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   145
            if (!done) {
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   146
                repaint = true;
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   147
                bb = getBackBuffer(true);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   148
            }
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   149
        }
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   150
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   151
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   152
    private static final Image clearImage(Image bb) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   153
        Graphics2D g = (Graphics2D)bb.getGraphics();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   154
        int w = bb.getWidth(null);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   155
        int h = bb.getHeight(null);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   156
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   157
        g.setComposite(AlphaComposite.Src);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   158
        g.setColor(new Color(0, 0, 0, 0));
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   159
        g.fillRect(0, 0, w, h);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   160
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   161
        return bb;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   162
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   163
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   164
    /**
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   165
     * A painter which uses BufferedImage as the internal buffer. The window
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   166
     * is painted into this buffer, and the contents then are uploaded
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   167
     * into the layered window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   168
     *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   169
     * This painter handles all types of images passed to its paint(Image)
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   170
     * method (VI, BI, regular Images).
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   171
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   172
    private static class BIWindowPainter extends TranslucentWindowPainter {
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   173
        private BufferedImage backBuffer;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   174
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   175
        protected BIWindowPainter(WWindowPeer peer) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   176
            super(peer);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   177
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   178
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   179
        @Override
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   180
        protected Image getBackBuffer(boolean clear) {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   181
            int w = window.getWidth();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   182
            int h = window.getHeight();
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   183
            if (backBuffer == null ||
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   184
                backBuffer.getWidth() != w ||
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   185
                backBuffer.getHeight() != h)
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   186
            {
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   187
                flush();
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   188
                backBuffer = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   189
            }
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   190
            return clear ? (BufferedImage)clearImage(backBuffer) : backBuffer;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   191
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   192
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   193
        @Override
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   194
        protected boolean update(Image bb) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   195
            VolatileImage viBB = null;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   196
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   197
            if (bb instanceof BufferedImage) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   198
                BufferedImage bi = (BufferedImage)bb;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   199
                int data[] =
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   200
                    ((DataBufferInt)bi.getRaster().getDataBuffer()).getData();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   201
                peer.updateWindowImpl(data, bi.getWidth(), bi.getHeight());
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   202
                return true;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   203
            } else if (bb instanceof VolatileImage) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   204
                viBB = (VolatileImage)bb;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   205
                if (bb instanceof DestSurfaceProvider) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   206
                    Surface s = ((DestSurfaceProvider)bb).getDestSurface();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   207
                    if (s instanceof BufImgSurfaceData) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   208
                        // the image is probably lost, upload the data from the
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   209
                        // backup surface to avoid creating another heap-based
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   210
                        // image (the parent's buffer)
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   211
                        int w = viBB.getWidth();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   212
                        int h = viBB.getHeight();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   213
                        BufImgSurfaceData bisd = (BufImgSurfaceData)s;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   214
                        int data[] = ((DataBufferInt)bisd.getRaster(0,0,w,h).
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   215
                            getDataBuffer()).getData();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   216
                        peer.updateWindowImpl(data, w, h);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   217
                        return true;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   218
                    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   219
                }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   220
            }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   221
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   222
            // copy the passed image into our own buffer, then upload
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   223
            BufferedImage bi = (BufferedImage)clearImage(backBuffer);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   224
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   225
            int data[] =
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   226
                ((DataBufferInt)bi.getRaster().getDataBuffer()).getData();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   227
            peer.updateWindowImpl(data, bi.getWidth(), bi.getHeight());
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   228
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   229
            return (viBB != null ? !viBB.contentsLost() : true);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   230
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   231
23272
0e0103e73d3c 8032435: Cleanup of sun.awt.windows package
serb
parents: 11271
diff changeset
   232
        @Override
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   233
        public void flush() {
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   234
            if (backBuffer != null) {
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   235
                backBuffer.flush();
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   236
                backBuffer = null;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   237
            }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   238
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   239
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   240
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   241
    /**
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   242
     * A version of the painter which uses VolatileImage as the internal buffer.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   243
     * The window is painted into this VI and then copied into the parent's
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   244
     * Java heap-based buffer (which is then uploaded to the layered window)
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   245
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   246
    private static class VIWindowPainter extends BIWindowPainter {
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   247
        private VolatileImage viBB;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   248
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   249
        protected VIWindowPainter(WWindowPeer peer) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   250
            super(peer);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   251
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   252
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   253
        @Override
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   254
        protected Image getBackBuffer(boolean clear) {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   255
            int w = window.getWidth();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   256
            int h = window.getHeight();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   257
            GraphicsConfiguration gc = peer.getGraphicsConfiguration();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   258
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   259
            if (viBB == null || viBB.getWidth() != w || viBB.getHeight() != h ||
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   260
                viBB.validate(gc) == IMAGE_INCOMPATIBLE)
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   261
            {
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   262
                flush();
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   263
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   264
                if (gc instanceof AccelGraphicsConfig) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   265
                    AccelGraphicsConfig agc = ((AccelGraphicsConfig)gc);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   266
                    viBB = agc.createCompatibleVolatileImage(w, h,
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   267
                                                             TRANSLUCENT,
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   268
                                                             RT_PLAIN);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   269
                }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   270
                if (viBB == null) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   271
                    viBB = gc.createCompatibleVolatileImage(w, h, TRANSLUCENT);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   272
                }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   273
                viBB.validate(gc);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   274
            }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   275
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   276
            return clear ? clearImage(viBB) : viBB;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   277
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   278
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   279
        @Override
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   280
        public void flush() {
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   281
            if (viBB != null) {
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   282
                viBB.flush();
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2451
diff changeset
   283
                viBB = null;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   284
            }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   285
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   286
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   287
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   288
    /**
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   289
     * Optimized version of hw painter. Uses VolatileImages for the
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   290
     * buffer, and uses an optimized path to pull the data from those into
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   291
     * the layered window, bypassing Java heap-based image.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   292
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   293
    private abstract static class VIOptWindowPainter extends VIWindowPainter {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   294
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   295
        protected VIOptWindowPainter(WWindowPeer peer) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   296
            super(peer);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   297
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   298
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   299
        protected abstract boolean updateWindowAccel(long psdops, int w, int h);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   300
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   301
        @Override
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   302
        protected boolean update(Image bb) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   303
            if (bb instanceof DestSurfaceProvider) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   304
                Surface s = ((DestSurfaceProvider)bb).getDestSurface();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   305
                if (s instanceof AccelSurface) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   306
                    final int w = bb.getWidth(null);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   307
                    final int h = bb.getHeight(null);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   308
                    final boolean arr[] = { false };
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   309
                    final AccelSurface as = (AccelSurface)s;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   310
                    RenderQueue rq = as.getContext().getRenderQueue();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   311
                    rq.lock();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   312
                    try {
11271
f10f98b24801 7117011: Reduce number of warnings in sun/awt/windows and sun/awt/datatransfer
denis
parents: 5506
diff changeset
   313
                        BufferedContext.validateContext(as);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   314
                        rq.flushAndInvokeNow(new Runnable() {
23272
0e0103e73d3c 8032435: Cleanup of sun.awt.windows package
serb
parents: 11271
diff changeset
   315
                            @Override
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   316
                            public void run() {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   317
                                long psdops = as.getNativeOps();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   318
                                arr[0] = updateWindowAccel(psdops, w, h);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   319
                            }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   320
                        });
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   321
                    } catch (InvalidPipeException e) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   322
                        // ignore, false will be returned
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   323
                    } finally {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   324
                        rq.unlock();
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   325
                    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   326
                    return arr[0];
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   327
                }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   328
            }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   329
            return super.update(bb);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   330
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   331
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   332
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   333
    private static class VIOptD3DWindowPainter extends VIOptWindowPainter {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   334
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   335
        protected VIOptD3DWindowPainter(WWindowPeer peer) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   336
            super(peer);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   337
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   338
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   339
        @Override
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   340
        protected boolean updateWindowAccel(long psdops, int w, int h) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   341
            // note: this method is executed on the toolkit thread, no sync is
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   342
            // necessary at the native level, and a pointer to peer can be used
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   343
            return sun.java2d.d3d.D3DSurfaceData.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   344
                updateWindowAccelImpl(psdops, peer.getData(), w, h);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   345
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   346
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   347
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   348
    private static class VIOptWGLWindowPainter extends VIOptWindowPainter {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   349
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   350
        protected VIOptWGLWindowPainter(WWindowPeer peer) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   351
            super(peer);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   352
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   353
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   354
        @Override
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   355
        protected boolean updateWindowAccel(long psdops, int w, int h) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   356
            // note: part of this method which deals with GDI will be on the
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   357
            // toolkit thread
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   358
            return sun.java2d.opengl.WGLSurfaceData.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   359
                updateWindowAccelImpl(psdops, peer, w, h);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   360
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   361
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents:
diff changeset
   362
}