--- old/modules/graphics/src/main/java/com/sun/scenario/effect/BoxShadow.java 2014-02-21 17:01:59.000000000 -0800 +++ new/modules/graphics/src/main/java/com/sun/scenario/effect/BoxShadow.java 2014-02-21 17:01:59.000000000 -0800 @@ -33,6 +33,7 @@ import com.sun.javafx.geom.transform.BaseTransform; import com.sun.scenario.effect.impl.Renderer; import com.sun.scenario.effect.impl.state.BoxShadowState; +import com.sun.scenario.effect.impl.state.LinearConvolveKernel; /** * A shadow effect using a box-shaped convolution kernel, with a configurable @@ -121,7 +122,7 @@ } @Override - Object getState() { + LinearConvolveKernel getState() { return state; } @@ -151,7 +152,7 @@ * * @return the horizontal size of the effect kernel */ - public int getHorizontalSize() { + public float getHorizontalSize() { return state.getHsize(); } @@ -168,8 +169,7 @@ * @throws IllegalArgumentException if {@code hsize} * is outside the allowable range */ - public void setHorizontalSize(int hsize) { - int old = state.getHsize(); + public final void setHorizontalSize(float hsize) { state.setHsize(hsize); } @@ -178,7 +178,7 @@ * * @return the vertical size of the effect kernel */ - public int getVerticalSize() { + public float getVerticalSize() { return state.getVsize(); } @@ -195,8 +195,7 @@ * @throws IllegalArgumentException if {@code vsize} * is outside the allowable range */ - public void setVerticalSize(int vsize) { - int old = state.getVsize(); + public final void setVerticalSize(float vsize) { state.setVsize(vsize); } @@ -226,8 +225,7 @@ * @throws IllegalArgumentException if {@code passes} is outside the * allowable range */ - public void setPasses(int passes) { - int old = state.getBlurPasses(); + public final void setPasses(int passes) { state.setBlurPasses(passes); } @@ -252,8 +250,7 @@ * @param color the shadow color * @throws IllegalArgumentException if {@code color} is null */ - public void setColor(Color4f color) { - Color4f old = state.getShadowColor(); + public final void setColor(Color4f color) { state.setShadowColor(color); } @@ -288,8 +285,7 @@ * @throws IllegalArgumentException if {@code spread} is outside the * allowable range */ - public void setSpread(float spread) { - float old = state.getSpread(); + public final void setSpread(float spread) { state.setSpread(spread); } @@ -385,39 +381,6 @@ } @Override - public ImageData filterImageDatas(FilterContext fctx, - BaseTransform transform, - Rectangle outputClip, - ImageData... inputs) - { - return state.filterImageDatas(this, fctx, transform, outputClip, inputs); - } - - @Override - public boolean operatesInUserSpace() { - return true; - } - - @Override - protected Rectangle getInputClip(int inputIndex, - BaseTransform transform, - Rectangle outputClip) - { - // A blur needs as much "fringe" data from its input as it creates - // around its output so we use the same expansion as is used in the - // result bounds. - if (outputClip != null) { - int hgrow = state.getKernelSize(0) / 2; - int vgrow = state.getKernelSize(1) / 2; - if ((hgrow | vgrow) != 0) { - outputClip = new Rectangle(outputClip); - outputClip.grow(hgrow, vgrow); - } - } - return outputClip; - } - - @Override public boolean reducesOpaquePixels() { return true; }