1 /* 2 * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 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 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 /* 27 * This file was originally generated by JSLC 28 * and then hand edited for performance. 29 */ 30 31 package com.sun.scenario.effect.impl.sw.sse; 32 33 import com.sun.scenario.effect.FilterContext; 34 import com.sun.scenario.effect.impl.Renderer; 35 36 public class SSELinearConvolveShadowPeer extends SSELinearConvolvePeer { 37 public SSELinearConvolveShadowPeer(FilterContext fctx, Renderer r, String uniqueName) { 38 super(fctx, r, uniqueName); 39 } 40 41 private float[] getShadowColor() { 42 return getKernel().getShadowColorComponents(getPass()); 43 } 44 45 private static native void 46 filterVector(int dstPixels[], int dstw, int dsth, int dstscan, 47 int srcPixels[], int srcw, int srch, int srcscan, 48 float weights[], int count, 49 float srcx0, float srcy0, 50 float offsetx, float offsety, 51 float deltax, float deltay, 52 float shadowColor[], 53 float dxcol, float dycol, float dxrow, float dyrow); 54 55 @Override 56 protected void 57 filterVector(int dstPixels[], int dstw, int dsth, int dstscan, 58 int srcPixels[], int srcw, int srch, int srcscan, 59 float weights[], int count, 60 float srcx0, float srcy0, 61 float offsetx, float offsety, 62 float deltax, float deltay, 63 float dxcol, float dycol, float dxrow, float dyrow) 64 { 65 filterVector(dstPixels, dstw, dsth, dstscan, 66 srcPixels, srcw, srch, srcscan, 67 weights, count, 68 srcx0, srcy0, 69 offsetx, offsety, 70 deltax, deltay, getShadowColor(), 71 dxcol, dycol, dxrow, dyrow); 72 } 73 74 /** 75 * In the nomenclature of the argument list for this method, "row" refers 76 * to the coordinate which increments once for each new stream of single 77 * axis data that we are blurring in a single pass. And "col" refers to 78 * the other coordinate that increments along the row. 79 * Rows are horizontal in the first pass and vertical in the second pass. 80 * Cols are vice versa. 81 */ 82 private static native void 83 filterHV(int dstPixels[], int dstcols, int dstrows, int dcolinc, int drowinc, 84 int srcPixels[], int srccols, int srcrows, int scolinc, int srowinc, 85 float weights[], float shadowColor[]); 86 87 @Override 88 protected void 89 filterHV(int dstPixels[], int dstcols, int dstrows, int dcolinc, int drowinc, 90 int srcPixels[], int srccols, int srcrows, int scolinc, int srowinc, 91 float weights[]) 92 { 93 filterHV(dstPixels, dstcols, dstrows, dcolinc, drowinc, 94 srcPixels, srccols, srcrows, scolinc, srowinc, 95 weights, getShadowColor()); 96 } 97 }