Don't add empty segments to XPS figures.
Don't add empty segments to XPS figures.

Prior to this change if a path started with two move-to verbs in a row
the error

Could not set path segments.
src\xps\SkXPSDevice.cpp(1265) : error 0x80004003: Invalid pointer

would be emitted. The issue is that IXpsOMGeometryFigure::SetSegments
returns E_POINTER if any of the pointers passed to it are nullptr even
if the counts are all 0. Since the IXpsOMGeometryFigure already contains
the starting point there is no need to add the empty segment.

In addition, this re-orders some code to always use segmentTypes,
segmentData, and segmentStrokes in that order (the order they are passed
to SetSegments) for consistency.

Change-Id: I1aa141516c883f9286a50ac265acbbebc039d348
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288635
Commit-Queue: Ben Wagner <53965154ffeecc4a10886eab9259e95965f2979a@google.com>
Reviewed-by: Herb Derby <9e12a3d2bbf73546e47cc9958f6ba8f3215b7eaf@google.com>

aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia