modules/graphics/src/test/java/test/com/sun/javafx/sg/prism/EffectDirtyRegionTest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 32,41 ****
--- 32,42 ----
import com.sun.javafx.geom.BaseBounds;
import com.sun.javafx.geom.DirtyRegionContainer;
import com.sun.javafx.geom.DirtyRegionPool;
import com.sun.javafx.geom.RectBounds;
import com.sun.javafx.geom.transform.BaseTransform;
+ import com.sun.javafx.scene.SceneHelper;
import com.sun.javafx.sg.prism.NGNode;
import com.sun.javafx.sg.prism.NGNode;
import com.sun.scenario.effect.Blend;
import com.sun.scenario.effect.Bloom;
import com.sun.scenario.effect.BoxBlur;
*** 482,492 ****
Assert.assertEquals(expected.getDirtyRegion(i), computed.getDirtyRegion(i));
}
}
public static NGNode getBaseNode(Node n) {
! Scene.impl_setAllowPGAccess(true);
// Eeek, this is gross! I have to use reflection to invoke this
// method so that bounds are updated...
try {
java.lang.reflect.Method method = Node.class.getDeclaredMethod("updateBounds");
method.setAccessible(true);
--- 483,493 ----
Assert.assertEquals(expected.getDirtyRegion(i), computed.getDirtyRegion(i));
}
}
public static NGNode getBaseNode(Node n) {
! SceneHelper.setAllowPGAccess(true);
// Eeek, this is gross! I have to use reflection to invoke this
// method so that bounds are updated...
try {
java.lang.reflect.Method method = Node.class.getDeclaredMethod("updateBounds");
method.setAccessible(true);
*** 494,504 ****
} catch (Exception e) {
throw new RuntimeException("Failed to update bounds", e);
}
n.impl_updatePeer();
NGNode bn = n.impl_getPeer();
! Scene.impl_setAllowPGAccess(false);
return bn;
}
public static Node group(Node... n) {
Group g = new Group(n);
--- 495,505 ----
} catch (Exception e) {
throw new RuntimeException("Failed to update bounds", e);
}
n.impl_updatePeer();
NGNode bn = n.impl_getPeer();
! SceneHelper.setAllowPGAccess(false);
return bn;
}
public static Node group(Node... n) {
Group g = new Group(n);