/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Manages per-application resources, e.g. the 1x1 pixmap used for solid color
* fill as well as per-application state e.g. the currently set source picture
* used for composition .
*
* @author Clemens Eisserer
*/
public class XRCompositeManager {
private static boolean enableGradCache = true;
int alphaMaskPict;
int gradCachePixmap;
int gradCachePicture;
boolean xorEnabled = false;
}
return instance;
}
con = new XRBackendNative();
// con = XRBackendJava.getInstance();
textRenderer = new XRTextRenderer(this);
}
setForeground(0);
if (enableGradCache) {
}
}
}
}
}
}
public void XRResetPaint() {
src = solidSrcPict;
}
// validate composite
if ((comp != validatedComp)) {
} else {
}
// the paint state is dependent on the composite state, so make
// sure we update the color below
updatePaint = true;
}
}
// validate paint
if (updatePaint) {
} else {
XRResetPaint();
}
}
if (src != solidSrcPict) {
try {
} catch (NoninvertibleTransformException e) {
at.setToIdentity();
}
}
}
if (comp instanceof AlphaComposite) {
this.extraAlpha = validatedExtraAlpha;
if (extraAlpha == 1.0f) {
} else {
}
xorEnabled = false;
} else if (comp instanceof XORComposite) {
/* XOR composite validation is handled in XRSurfaceData */
xorEnabled = true;
} else {
throw new InternalError(
"Composite accaleration not implemented for: "
}
}
public boolean maskRequired() {
return (!xorEnabled)
&& ((src != solidSrcPict)
}
cachedX = 0;
cachedY = 0;
}
}
int renderReferenceX = 0;
int renderReferenceY = 0;
} else {
}
}
if (xorEnabled) {
} else {
}
}
}
}
}
public int getExtraAlphaMask() {
return alphaMask;
}
public boolean isTexturePaintActive() {
}
return alphaColor;
}
return con;
}
public float getExtraAlpha() {
return validatedExtraAlpha;
}
public byte getCompRule() {
return compRule;
}
return textRenderer;
}
return maskBuffer;
}
return maskImage;
}
}