Couple of allocation changes to SkPath

This does the following:
, Changes SkPathRef::incReserve so that if a reallocation is needed,
  more than enough space is allocated (kGrowing). This the old
  behavior before I modified SkPathRef to use SkSTArray. This is
  necessary for creation of big paths as otherwise an allocation
  happens for each item added to the path.
. When an empty path is being modified it grows to exactly fit the
  suggested hints. This is for the chrome deserialization
  cases where it calls incReserve() on an empty path before
  deserializing. If this change was not done, then because of the
  first change, chrome's deserialization phase would allocate more
  than is necessary, which impacts motionmark.

Bug: chromium: 1407567


Change-Id: I3fd5f901bfeb028fb0db38d5a1e9441dd119829f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/633078
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
3 files changed