Skip to content

Commit 0c463cf

Browse files
committed
CSSTUDIO-1905 Set CacheHint of ImageView to "CacheHint.SCALE" for Symbol widget.
1 parent f08958b commit 0c463cf

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.util.logging.Level;
2424
import java.util.stream.Collectors;
2525

26+
import javafx.scene.CacheHint;
2627
import org.csstudio.display.builder.model.ArrayWidgetProperty;
2728
import org.csstudio.display.builder.model.DirtyFlag;
2829
import org.csstudio.display.builder.model.DisplayModel;
@@ -413,6 +414,9 @@ public void updateChanges ( ) {
413414
@Override
414415
protected StackPane createJFXNode ( ) throws Exception {
415416

417+
imageView.setCache(true);
418+
imageView.setCacheHint(CacheHint.SCALE); // Prevents excessive VRAM usage when zooming in using the D3D library for rendering under Windows.
419+
416420
autoSize = model_widget.propAutoSize().getValue();
417421
symbol = new Symbol(); //getDefaultSymbol();
418422

0 commit comments

Comments
 (0)