Skip to content

Commit 9ef752e

Browse files
committed
CSSTUDIO-1905 Enable caching and set the property "CacheHint" to "CacheHint.SCALE" on the "Picture" widget. This prevents excessive VRAM usage when using D3D graphics for running Phoebus under Windows when zooming in.
1 parent 544bb1d commit 9ef752e

File tree

1 file changed

+3
-0
lines changed
  • app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets

1 file changed

+3
-0
lines changed

app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/PictureRepresentation.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import java.util.logging.Level;
1313

14+
import javafx.scene.CacheHint;
1415
import org.csstudio.display.builder.model.DirtyFlag;
1516
import org.csstudio.display.builder.model.DisplayModel;
1617
import org.csstudio.display.builder.model.UntypedWidgetPropertyListener;
@@ -56,6 +57,8 @@ public ImageView createJFXNode() throws Exception
5657
{
5758
final ImageView iv = new ImageView();
5859
iv.setSmooth(true);
60+
iv.setCache(true);
61+
iv.setCacheHint(CacheHint.SCALE);
5962
iv.getTransforms().addAll(translate, rotation);
6063
return iv;
6164
}

0 commit comments

Comments
 (0)