modules/graphics/src/main/java/com/sun/scenario/effect/Brightpass.java
Print this page
@@ -25,10 +25,11 @@
package com.sun.scenario.effect;
import com.sun.javafx.geom.Rectangle;
import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.scenario.effect.impl.state.RenderState;
/**
* An effect that filters out (i.e., replaces with a transparent value) all
* pixels with brightness lower than the configurable threshold value.
*/
@@ -113,18 +114,17 @@
float old = this.threshold;
this.threshold = threshold;
}
@Override
- protected Rectangle getInputClip(int inputIndex,
+ public RenderState getRenderState(FilterContext fctx,
BaseTransform transform,
- Rectangle outputClip)
+ Rectangle outputClip,
+ Object renderHelper,
+ Effect defaultInput)
{
- // Trivially, this effect simply modifies the alpha values of the
- // pixels of the input on a 1:1 basis so the input clip is the same
- // as the output clip.
- return outputClip;
+ return RenderState.RenderSpaceRenderState;
}
@Override
public boolean reducesOpaquePixels() {
return true;