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

ChoiceBox & Preview Menu controls flicker when you move from item to item on Linux installations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • fx1.3
    • javafx

      Snippet 1

      java.lang.System.setProperty( "javafx.allowTransparentStage", "true" );
      Stage {
          title: "Application title"
          scene: Scene {
              width: 250
              height: 80
              content: [
                  ChoiceBox{
                      items: ["1","2", "3","4","5", "6"]
                  }
       
              ]
          }
      }

      The bug is pronounced if you add more items in the choicebox. Around 5-6 strings in the choicebox should be good enough to see the flicker clearly. If you move the mouse up and down over the various items, you can see the flicker clearly.

      To get some more info about what is hapenning beneath the scenes, I ran the program with -Dsun.java2d.trace=log set
      This gave the following output in the console when I move the mouse over the items in the choicebox

      sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntArgbPre)
      sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(AnyColor, SrcNoEa, IntArgbPre)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntArgbPre)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntArgbPre)
      sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(AnyColor, SrcNoEa, IntArgbPre)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntArgbPre)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntArgbPre)
      sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(AnyColor, SrcNoEa, IntArgbPre)

      Now I ran the same code snippet with with -Dsun.java2d.trace=log set but did NOT set the javafx.allowTransparentStage property. In this case the white rectangle comes behind the choicebox :( (And hence we cannot NOT go with approach), but there is NO flicker when I move my mouse over the choice box items

      The dump in this case was

      sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntRgb)
      sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(AnyColor, SrcNoEa, IntRgb)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntRgb)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntRgb)
      sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(AnyColor, SrcNoEa, IntRgb)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntRgb)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntRgb)
      sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(AnyColor, SrcNoEa, IntRgb)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntRgb)
      sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntRgb)
      sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(AnyColor, SrcNoEa, IntRgb)
      sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)


      It appears from the dump that there is an sandwiching Blit operation when there is no flicker. Does this give any clue? Or am I barking up the wrong tree?

            psomashe Parvathi Somashekar (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: