On Tue, Jun 19, 2018 at 5:01 PM, Keith Packard <kei...@keithp.com> wrote:
> Jason Ekstrand <ja...@jlekstrand.net> writes: > > I see two styles here -- get_physical_device_display_properties* both > use a helper function that takes a pointer to either of the property > returns while get_physical_device_display_plane_properties* and > get_display_mode_properties* open-code things. > > I'm easy with which style you pick, but I think they should be the > same. I have a mild preference for the second style as I think it's > easier to read the code without all of the conditionals. > I did that mostly because the iteration in get_physical_device_display_properties was more complicated and seemed to require "real" set-up. It's not terrible so I'd be ok with open-coding it if needed. Another option would be to create a temporary and call the 2 variant and then copy the elements one-by-one into the output. Sadly, it's gross no matter which way we go. Thoughts? --Jason
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev