Fix thread safety in skia_test

Fixes missing configuration flags in utils/SkCondVar to enable
posix thread model implementation. Currently this affects the
skia_test's thread pool, which is not thread safe, and causes
sporadic crashes.

Change-Id: Icb712725da984493c80944ed8b63af8dc62e9a79
Signed-off-by: Joakim Landberg <joakim.landberg@intel.com>
am 3bfbf8e9: (-s ours) Merge "Fix libskia build for x86 and x86_64."

* commit '3bfbf8e9e699d8571f2a993e5c2f16bf75e2dc31':
  Fix libskia build for x86 and x86_64.
am 46d1b29e: (-s ours) Merge "Fix arm64 and mips skia builds"

* commit '46d1b29e41a4ef3db3bcdfe3e71d7253a0de54a7':
  Fix arm64 and mips skia builds
am f44636c0: (-s ours) Merge "[MIPS64] Enable mips64 build"

* commit 'f44636c0a6cbaf7bf3e231e8e53e486952424666':
  [MIPS64] Enable mips64 build
Merge "Fix thread safety in skia_test"
am dfdc5f9c: Add thread safety configuration check. do not merge

* commit 'dfdc5f9cd3f2add599f23192bffc4f2d8568a897':
  Add thread safety configuration check. do not merge
am 72aeba3d: Merge "Add a README." into lmp-dev

* commit '72aeba3d256498a5b554ca4e11827192ee5631e8':
  Add a README.
Change SkCanvasState to use inheritance.

Cherry-pick of
https://skia.googlesource.com/skia/+/352c2181d15ed053c3b759f08ff1f51d50e2d3bb

The base class, SkCanvasState, now holds the version, width, and
height. These fields will always be a necessary part of the class.
(Also add in some padding.)
The other fields, which may change, have been moved into the
subclass, SkCanvasState_v1. If/when the version changes, it will
correspond to a new subclass.
In SkCanvasStateUtils::CreateFromCanvasState, check the version on
the base class, then do a static_cast to the version corresponding
to SkCanvasState::version.

Remove CANVAS_STATE_VERSION, which is redundant with the version
specified by the subclass.

Use unambiguous type for rowBytes.

Build Android with SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG. This allows us
to run the full suite of CanvasState tests. It is also representative
of what will be used on Android by WebView.

Fix CanvasStateTest where it was broken inside ifdef'ed out code.

Update the comments in the header to be more clear. In particular,
an SkCanvasState can only be used to pass an SkCanvas' state to a
future version of Skia (or the same); not an older version.

NOTREECHECKS=true

BUG=b/15693384
R=reed@google.com, mtklein@google.com, djsollen@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/372003002

Change-Id: I75ef9443291b308a3555e4b2154bdc087f419662
Merge "Change SkCanvasState to use inheritance."
am ecd936fe: (-s ours) Merge "Fix thread safety in skia_test"

* commit 'ecd936fe6ed3c2dba29a06074894cd8a5e832d76':
  Fix thread safety in skia_test
am d6f2c76f: (-s ours) Merge "Change SkCanvasState to use inheritance."

* commit 'd6f2c76fdb9b0469261fa2db0b29ed48c7ac38b5':
  Change SkCanvasState to use inheritance.
am 7c4fd9b2: Change SkCanvasState to use inheritance. DO NOT MERGE.

* commit '7c4fd9b27bf4c140c63e3861f48fe1cfc12d0fae':
  Change SkCanvasState to use inheritance. DO NOT MERGE.
am 9ed58377: Merge changes from Skia\'s m37 branch into lmp-dev.

* commit '9ed58377b45739aa8f9dc1b02049ab29c137a838':
  Merge changes from Skia's m37 branch into lmp-dev.
am 9a2054a6: Merge "Fix image decoder memory overwrite bug." into lmp-dev

* commit '9a2054a6e7b81d834ed93db83af8ff452d720028':
  Fix image decoder memory overwrite bug.
am 1d1f4336: Add FDO support to libskia.

* commit '1d1f4336f31dedd67c41fe46bc1f962e63c7177e':
  Add FDO support to libskia.
am d9bff96e: Enable skia_bench_pictures for use by the fdo optimizer. DO NOT MERGE.

* commit 'd9bff96e7785b872e2dc701256e3ac7d7b563b30':
  Enable skia_bench_pictures for use by the fdo optimizer. DO NOT MERGE.
am 4e4a89da: Merge changes from Skia\'s m37 branch into lmp-dev.

* commit '4e4a89dab47d74874d6a79c4b34d89ffbfb386af':
  Merge changes from Skia's m37 branch into lmp-dev.
am 11bda2c5: Revert to old autohinting behavior on Android.

* commit '11bda2c5a518b90302331a5ffe647b4d30d8093e':
  Revert to old autohinting behavior on Android.
am 6e623cf3: Merge "Use medium filtering when downscaling bitmap glyphs in FreeType host" into lmp-dev

* commit '6e623cf3ee32a90859a36cf06364af320c54f793':
  Use medium filtering when downscaling bitmap glyphs in FreeType host
am 4b24578b: Merge "Use -O2 during FDO instrument/optimize builds. Bug: 16205175" into lmp-dev

* commit '4b24578b898343dddb51a565d7b919d64e2dc2db':
  Use -O2 during FDO instrument/optimize builds. Bug: 16205175