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

Changing FloatMap.width/height does not work properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3
    • fx2.0
    • fx1.0
    • javafx

    Description

      See attached testcase (DispTest2.fx). Changing the FloatMap.width/height variables should cause the underlying (Decora level) FloatMap buffer to be resized as well. However, this does not appear to work as it was intended. Currently the implementation of DisplacementMap recreates the Decora-level FloatMap instance but does not reattach the new FM instance to the DM instance, so any setSample() calls go into Never Never Land.

      The attached testcase also shows that an exception may be thrown when FloatMap.width/height are set to zero, which needs to be fixed:
      Exception in trigger:
      java.lang.IllegalArgumentException: Map data must be non-null
      at com.sun.scenario.effect.DisplacementMap.setMapData(DisplacementMap.java:91)
      at javafx.scene.effect.DisplacementMap$_SBECL.onChange(DisplacementMap.fx:118)
      at com.sun.javafx.runtime.location.ObjectVariable.notifyListeners(ObjectVariable.java:142)
      at com.sun.javafx.runtime.location.ObjectVariable.replaceValue(ObjectVariable.java:104)
      at com.sun.javafx.runtime.location.AbstractBindingExpression.pushValue(AbstractBindingExpression.java:100)
      at com.sun.javafx.runtime.location.ObjectVariable$1.compute(ObjectVariable.java:89)
      at com.sun.javafx.runtime.location.AbstractVariable.update(AbstractVariable.java:128)
      at com.sun.javafx.runtime.location.AbstractVariable.bind(AbstractVariable.java:98)
      at com.sun.javafx.runtime.location.AbstractVariable.bind(AbstractVariable.java:88)
      at DispTest2.javafx$run$(DispTest2.fx:57)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.sun.javafx.runtime.provider.GUIRuntimeProvider$1.run(GUIRuntimeProvider.java:65)
      at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(SwingToolkit.fx:593)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

      Attachments

        Activity

          People

            flar Jim Graham
            campbell Christopher Campbell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: