Re: [Rev 03] RFR: 8217472: Add attenuation for PointLight

2020-04-26 Thread Nir Lisker
>
> Will there also be any performance drop in case you just use the default
> parameters for the lighting?


That's what we're testing.

The default, which corresponds to the current lighting, should not need
> any additional computations
> and thus no performance drop.


But there is no way to know if you're using the default values unless you
check for it, and that already is a cost.
The only way to guarantee that there is no performance drop is to add a
boolean that enables/disables these changes, and that will require
generating double the shaders - for the "on" case and for the "off" case.
We are trying to avoid this. These changes should be negligible according
to "current knowledge", but we have to test. For some reason we saw a
drop in one of the hardware configurations that was tested.

On Sat, Apr 25, 2020 at 8:33 PM Michael Paus  wrote:

> Am 25.04.20 um 19:09 schrieb Kevin Rushforth:
> > On Fri, 24 Apr 2020 05:06:56 GMT, Phil Race  wrote:
> >
> >>> Here is a slightly modified test program. It fixes a compilation error
> in the previous, and also adds a system property
> >>> to set the number of quads:
> >>> It creates 200 quads by default. If you need to increase this or
> decrease it to get something in the ~ 10 fps range you
> >>> can do that with `-DnumQuads=`.
> >>> [pointlighttest.zip](
> https://github.com/openjdk/jfx/files/4526179/pointlighttest.zip)
> >> @kevinrushforth
> >> Member
> >> kevinrushforth commented Apr 18, 2020
> >>
> >> I think most of those are good suggestions going forward. As for the
> performance drop, the only place we've seen it so
> >> far is on graphics accelerators that are a few years old by now.
> >> So 50% drop on a 2015 macbook pro is OK ? Do we have numbers on recent
> macbook pros ?
> > If this were an even remotely representative use case, then no, the
> performance hit would not be OK. The test was
> > designed as an artificial "worst-case" stress test: a single mesh with a
> large number of very large (window-sized)
> > quads stacked on top of each other. Any real-world use case won't do
> this.
> >
> > We should make sure that we aren't seeing any significant performance
> drop when rendering spheres (at a couple
> > different tessellation levels) or boxes.
> >
> > -
> >
> > PR: https://git.openjdk.java.net/jfx/pull/43
>
> Will there also be any performance drop in case you just use the default
> parameters for the lighting?
> The default, which corresponds to the current lighting, should not need
> any additional computations
> and thus no performance drop.
>
>


Re: RFR: 8129123: ComboBox popup list view does not scrollTo when ComboBox value/selection is set

2020-04-26 Thread Jeanette Winzenburg
On Sun, 19 Apr 2020 10:37:56 GMT, Craig Cavanaugh 
 wrote:

>For me / my users / and the open bug, it is a bug due to the current 
> behavior being unexpected.  It creates the
>illusion of a preselected value not actually being selected because it's 
> not visible if the list is large and has been
>shown.  It creates doubt and the user has to scroll to reconfirm their 
> selection which takes extra unnecessary effort
>and time.
> 

Yes, I understand the perspective of the users (would be unhappy with it as 
well) - but from the perspective of the fx,
it's the job of the application developer to keep a selected item visible. 
Which s/he could do easily enough, even for
a comboBox. Also I agree, that in the case of the combo it feels unexpected to 
not the selected item on opening the
popup. So we could do something about it - but we have to specify _exactly_ 
what that something should be.

>With my testing, for the ComboBox, behavior was smooth and natural.  I've 
> not made any attempt to change selection with
>it shown and I'm not certain it can happen unless done programmatically.  
> User selection within the list requires
>scrolling, so the selected value is already visible.
> 

Hmm, probably wasn't clear enough: have a combo with many items, open the 
popup, navigate (via keys like page/up/down
..) and compare the behavior before/after the fix. I see considerable 
differences in behavior. F.i. keyDown does move
the selection one-down without scrolling before and scrolls down by one after 
(making the selected item visually
"stick" at the top). Do you see that as well or did I goof somehow (also a 
possibility :) ?

Navigation behavior should be the same before/after, I think. There might be 
other behavior changes introduced (didn't
check further, it's your issue :), that we should actively look out for.

>I'm not opposed to taking this approach.  My current work around by 
> extending ComboBox is based on scrolling when the
>value is set (restored) programmatically.  I could see how it may be more 
> efficient if multiple selections were being
>performed programmatically, but not sure why someone would write code this 
> way.  I would think it's a one shot process
>to select the final value.
> 

not sure what you mean by "one shot process" and "final value":  the fix 
scrolls the list to top whenever the value
changes, and the value is changed whenever the selectedItem is changed which 
happens on navigation (that is user
interaction) as well as changing it programatically.

Maybe we should really go back to square one and _exactly_ specify when we want 
the value be scrolled into view. The
current fix does so for _each_ selection (which has rather broad effects). If 
it could be bounded a bit more, the
effects would be narrower. That's why I suggested to limit it f.i. to the time 
of opening the popup (which is  rather
rare compared to selection change).

>   Implementing the change in ListView would not change/improve ChoiceBox 
> simply because it does not use an underlying
>   ListView.

yeah, forget about ChoiceBox, I was wrong - whoever needs to scroll to the 
selected value is using the wrong control
..

> My search on uses of ListView only reviled ComboBox other than itself.  Since 
> ListView by itself is not
> collapsed/hidden for typical uses, would automatic scrolling within ListView 
> create a confusing experience?

Ahh, guilty of having been unclear again, sry - what I meant is to add support 
of doing a well-behaved scrolling in
ListView (and the other virtualized controls): scrollTo is not overly 
well-behaved. And I agree, doing it always and
unconditionally, might introduce a bad user experience.

-

PR: https://git.openjdk.java.net/jfx/pull/166