Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8329382

Unified window does not render content on d3d with intel GPU

XMLWordPrintable

    • x86_64
    • windows

      ADDITIONAL SYSTEM INFORMATION :
      Surface Laptop Studio - Windows 11 22H2, i5-11300H, Intel Iris Xe Graphics

      A DESCRIPTION OF THE PROBLEM :
      When using an intel GPU on Windows, Windows using the UNIFIED style open, but do not visibly render any content.

      This issue seems to be exclusive to the d3d renderer, as it does not occur when using the software renderer, or on other operating systems on the same hardware.

      Setting prism.forceUploadingPainter to true circumvents the issue.

      This issue appears to be similar to this existing issue https://bugs.openjdk.org/browse/JDK-8154847 (I am creating this issue to add additional information and share a workaround, as I am not a contributor)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      On windows, with an intel GPU:
      Create a javafx stage with some visible content, call Stage.initStyle(StageStyle.UNIFIED), show the stage.



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The stage shows up, with contents visible.
      ACTUAL -
      The stage shows up, but only a white background is visible.

      ---------- BEGIN SOURCE ----------
      package org.example.demo;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.layout.StackPane;
      import javafx.scene.paint.Color;
      import javafx.scene.shape.Rectangle;
      import javafx.stage.Stage;
      import javafx.stage.StageStyle;

      public class HelloApplication extends Application {
          @Override
          public void start(Stage stage) {
              // Example Scene
              Rectangle box = new Rectangle(0,0,100, 100);
              box.setFill(Color.RED);
              Label label = new Label("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
              StackPane stackPane = new StackPane(box, label);
              Scene scene = new Scene(stackPane, 320, 240);
              // Stage
              stage.initStyle(StageStyle.UNIFIED);
              stage.setScene(scene);
              stage.show();
          }

          public static void main(String[] args) {
              launch();
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Set prism.forceUploadingPainter to true via jvm argument (-Dprism.forceUploadingPainter=true)

      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: