modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGGroup.java

Print this page




 232         FilterContext fctx = getFilterContext(g);
 233 
 234         ImageData bot = null;
 235         boolean idValid = true;
 236         do {
 237             // TODO: probably don't need to wrap the transform here... (RT-26981)
 238             BaseTransform transform = g.getTransformNoClone().copy();
 239             if (bot != null) {
 240                 bot.unref();
 241                 bot = null;
 242             }
 243             Rectangle rclip = PrEffectHelper.getGraphicsClipNoClone(g);
 244             for (int i = startPos; i < children.size(); i++) {
 245                 NGNode child = children.get(i);
 246                 ImageData top = NodeEffectInput.
 247                     getImageDataForNode(fctx, child, false, transform, rclip);
 248                 if (bot == null) {
 249                     bot = top;
 250                 } else {
 251                     ImageData newbot =
 252                         b.filterImageDatas(fctx, transform, rclip, bot, top);
 253                     bot.unref();
 254                     top.unref();
 255                     bot = newbot;
 256                 }
 257             }
 258             if (bot != null && (idValid = bot.validate(fctx))) {
 259                 Rectangle r = bot.getUntransformedBounds();
 260                 PrDrawable botimg = (PrDrawable)bot.getUntransformedImage();
 261                 g.setTransform(bot.getTransform());
 262                 g.drawTexture(botimg.getTextureObject(),
 263                         r.x, r.y, r.width, r.height);
 264             }
 265         } while (bot == null || !idValid);
 266 
 267         if (bot != null) {
 268             bot.unref();
 269         }
 270     }
 271 
 272     @Override




 232         FilterContext fctx = getFilterContext(g);
 233 
 234         ImageData bot = null;
 235         boolean idValid = true;
 236         do {
 237             // TODO: probably don't need to wrap the transform here... (RT-26981)
 238             BaseTransform transform = g.getTransformNoClone().copy();
 239             if (bot != null) {
 240                 bot.unref();
 241                 bot = null;
 242             }
 243             Rectangle rclip = PrEffectHelper.getGraphicsClipNoClone(g);
 244             for (int i = startPos; i < children.size(); i++) {
 245                 NGNode child = children.get(i);
 246                 ImageData top = NodeEffectInput.
 247                     getImageDataForNode(fctx, child, false, transform, rclip);
 248                 if (bot == null) {
 249                     bot = top;
 250                 } else {
 251                     ImageData newbot =
 252                         b.filterImageDatas(fctx, transform, rclip, null, bot, top);
 253                     bot.unref();
 254                     top.unref();
 255                     bot = newbot;
 256                 }
 257             }
 258             if (bot != null && (idValid = bot.validate(fctx))) {
 259                 Rectangle r = bot.getUntransformedBounds();
 260                 PrDrawable botimg = (PrDrawable)bot.getUntransformedImage();
 261                 g.setTransform(bot.getTransform());
 262                 g.drawTexture(botimg.getTextureObject(),
 263                         r.x, r.y, r.width, r.height);
 264             }
 265         } while (bot == null || !idValid);
 266 
 267         if (bot != null) {
 268             bot.unref();
 269         }
 270     }
 271 
 272     @Override