3909N/A * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 2370N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2370N/A * This code is free software; you can redistribute it and/or modify it 2370N/A * under the terms of the GNU General Public License version 2 only, as 2685N/A * published by the Free Software Foundation. Oracle designates this 2370N/A * particular file as subject to the "Classpath" exception as provided 2685N/A * by Oracle in the LICENSE file that accompanied this code. 2370N/A * This code is distributed in the hope that it will be useful, but WITHOUT 2370N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2370N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2370N/A * version 2 for more details (a copy is included in the LICENSE file that 2370N/A * You should have received a copy of the GNU General Public License version 2370N/A * 2 along with this work; if not, write to the Free Software Foundation, 2370N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2685N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2685N/A * or visit www.oracle.com if you need additional information or have any 2370N/A * Synchronized accessor method for isDrawableValid. 2370N/A * The textpipe for now can't handle TexturePaint when extra-alpha is 2370N/A * TODO: Can we rely on the GC for ARGB32 surfaces? 2370N/A // custom paints handled by super.validatePipe() below 2370N/A // install the text pipe based on our earlier decision 2370N/A // always override the image pipe with the specialized XRender pipe 2370N/A * Method for instantiating a Window SurfaceData 2370N/A * Method for instantiating a Pixmap SurfaceData (offscreen). 2370N/A * If the surface * is opaque a 24-bit/RGB surface is chosen, 2370N/A * otherwise a 32-bit ARGB surface. 2370N/A 0x00FF0000,
0x0000FF00,
0x000000FF);
2370N/A * Inits the XRender-data-structures which belong to the XRSurfaceData. 2370N/A * Returns a boolean indicating whether or not a copyArea from the given 2370N/A * rectangle source coordinates might be incomplete and result in X11 2370N/A * GraphicsExposure events being generated from XCopyArea. This method 2370N/A * allows the SurfaceData copyArea method to determine if it needs to set 2370N/A * the GraphicsExposures attribute of the X11 GC to True or False to receive 2370N/A * @return true if there is any chance that an XCopyArea from the given 2370N/A * source coordinates could produce any X11 Exposure events. 2370N/A * CopyArea is implemented using the "old" X11 GC, therefor clip and 2370N/A * needExposures have to be validated against that GC. Pictures and GCs 2370N/A * Returns the XRender SurfaceType which is able to fullfill the specified 2370N/A * transparency requirement. 2370N/A private long xgc;
// GC is still used for copyArea 2370N/A * Validates an XRSurfaceData when used as source. Note that the clip is 2370N/A * applied when used as source as well as destination. 2370N/A * Validates the Surface when used as destination. 2370N/A * TODO: Why is this synchronized, 2370N/A * Returns destination Component associated with this SurfaceData. 2370N/A * Need this since the surface data is created with the color model of 2370N/A * the target GC, which is always opaque. But in SunGraphics2D.blitSD we 2370N/A * choose loops based on the transparency on the source SD, so it could 2370N/A * choose wrong loop (blit instead of blitbg, for example). 2370N/A * We need to invalidate the surface before disposing the native 2370N/A * Drawable and Picture. This way if an application tries to render 2370N/A * to an already flushed XRSurfaceData, we will notice in the 2370N/A * validate() method above that it has been invalidated, and we will 2370N/A * avoid using those native resources that have already been 2370N/A * Returns destination Image associated with this SurfaceData.