Reland "Optimize TransformPaintPropertyNode for 2d translations"

This reverts commit 902b255d0396b773a7a62da8714c5f716328b1ec.

The original patch caused crbug.com/933693. If the start value of a
transform animation is identity or a 2d translation, previously we
omitted the origin causing wrong origin was used by the compositor
when the transform changed to depend on the origin. The fix is to
disable the optimization when we are running composited animation.

Original change's description:
> Revert "Optimize TransformPaintPropertyNode for 2d translations"
>
> This reverts commit f70ca727971c65d2647395ca3613bebb12c18f67.
>
> Reason for revert: crbug.com/933693
>
> Original change's description:
> > Optimize TransformPaintPropertyNode for 2d translations
> >
> > Based on crrev.com/c/1457744, this CL also optimizes
> > TransformPaintPropertyNode by storing 2d translation by default,
> > and allocate TransformationMatrix only when the transform is
> > not identity or 2d translation.
> >
> > Combined with crrev.com/c/1457744, this CL can improve
> > record_time by 3.2%, record_time_caching_disabled by 1.9%,
> > record_time_subsequence_caching_disabled by 2.1%,
> > pixel_recorded by 2.7%:
> > https://ct.skia.org/results/cluster-telemetry/tasks/chromium_perf_runs/wangxianzhu-20190213071211/html/index.html
> >
> > Bug: 921729
> > Change-Id: I41ba5d81477fd1339b4aaca29d4518023aa2abdc
> > Reviewed-on: https://chromium-review.googlesource.com/c/1460135
> > Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> > Reviewed-by: Philip Rogers <pdr@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#633482}
>
> TBR=wangxianzhu@chromium.org,pdr@chromium.org,chrishtr@chromium.org
>
> Change-Id: I55930b83f3eae22e282def26db569b08ce7ebbab
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 921729, 933693
> Reviewed-on: https://chromium-review.googlesource.com/c/1478943
> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#633736}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 921729, 933693
Change-Id: Ibc6d63cb8c6a324d483140c284e8172342becf93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1491136
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#639348}
33 files changed