--- /dev/null 2016-09-01 15:38:59.076007815 -0400 +++ new/modules/javafx.graphics/src/jslc/resources/com/sun/scenario/effect/compiler/backend/sw/sse/SSEJavaGlue.stg 2016-09-11 10:36:27.577639358 -0400 @@ -0,0 +1,104 @@ +group SSEJavaGlue; + +glue(effectName,peerName,genericsDecl,interfaceDecl, + usercode,samplers,cleanup,srcRects,constants,params,paramDecls) ::= << +/* + * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +/* + * This file was generated by JSLC -- DO NOT EDIT MANUALLY! + */ + +package com.sun.scenario.effect.impl.sw.sse; + +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import com.sun.scenario.effect.Effect; +import com.sun.scenario.effect.FilterContext; +import com.sun.scenario.effect.FloatMap; +import com.sun.scenario.effect.ImageData; +import com.sun.scenario.effect.$effectName$; +import com.sun.scenario.effect.impl.BufferUtil; +import com.sun.scenario.effect.impl.HeapImage; +import com.sun.scenario.effect.impl.Renderer; +import com.sun.scenario.effect.impl.state.*; +import com.sun.javafx.geom.Rectangle; +import com.sun.javafx.geom.transform.BaseTransform; + +public class SSE$peerName$Peer extends SSEEffectPeer$genericsDecl$ $interfaceDecl$ { + + public SSE$peerName$Peer(FilterContext fctx, Renderer r, String uniqueName) { + super(fctx, r, uniqueName); + } + + @Override + protected final $effectName$ getEffect() { + return ($effectName$)super.getEffect(); + } + + $usercode$ + + @Override + public ImageData filter(Effect effect, + RenderState rstate, + BaseTransform transform, + Rectangle outputClip, + ImageData... inputs) + { + setEffect(effect); + Rectangle dstBounds = getResultBounds(transform, outputClip, inputs); + setDestBounds(dstBounds); + + // TODO: for now, all input images must be TYPE_INT_ARGB_PRE + $samplers$ + + $srcRects$ + + final int dstx = 0; + final int dsty = 0; + final int dstw = dstBounds.width; + final int dsth = dstBounds.height; + + HeapImage dst = (HeapImage)getRenderer().getCompatibleImage(dstw, dsth); + setDestNativeBounds(dst.getPhysicalWidth(), dst.getPhysicalHeight()); + int dstscan = dst.getScanlineStride(); + int[] dstPixels = dst.getPixelArray(); + + $constants$ + + filter(dstPixels, dstx, dsty, dstw, dsth, dstscan$params$); + + $cleanup$ + + return new ImageData(getFilterContext(), dst, dstBounds); + } + + private static native void filter(int[] dstPixels, + int dstx, int dsty, + int dstw, int dsth, + int dstscan$paramDecls$); +} + +>>