modules/graphics/src/main/java/com/sun/scenario/effect/Flood.java

Print this page

        

@@ -30,10 +30,11 @@
 import com.sun.javafx.geom.DirtyRegionContainer;
 import com.sun.javafx.geom.DirtyRegionPool;
 import com.sun.javafx.geom.RectBounds;
 import com.sun.javafx.geom.Rectangle;
 import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.scenario.effect.impl.state.RenderState;
 
 /**
  * An effect that renders a rectangular region that is filled ("flooded")
  * with the given paint.  This is equivalent to rendering a
  * filled rectangle into an image and using an {@code Identity} effect,

@@ -162,16 +163,20 @@
     public Point2D untransform(Point2D p, Effect defaultInput) {
         return new Point2D(Float.NaN, Float.NaN);
     }
 
     @Override
-    protected Rectangle getInputClip(int inputIndex,
+    public RenderState getRenderState(FilterContext fctx,
                                      BaseTransform transform,
-                                     Rectangle outputClip)
+                                      Rectangle outputClip,
+                                      Object renderHelper,
+                                      Effect defaultInput)
     {
-        // TODO: Intersect with the flood bounds?
-        return outputClip;
+        // TODO: Intersect with the flood bounds?  For now just use the
+        // stock RenderSpaceRenderState which performs no modifications
+        // on the output bounds for its inputs.
+        return RenderState.RenderSpaceRenderState;
     }
 
     @Override
     public boolean reducesOpaquePixels() {
         return true;