[PW] Scale canvas when PaintRecorder is created
Right now in PaintRenderingContext2D, the canvas is scaled after the InitializePaintRecorder. This is too late because we already do canvas->save() at the InitializePaintRecorder. Trying to scale the canvas after save operation doesn't apply the scale. This can be seem by zoom in a paint worklet page and seeing that the drawing isn't zoomed in. This CL fixes the problem and added a layout test. Bug: 970783 Change-Id: Ic0c8a84cc22c8cef9b325e134925e482bee1e65d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670439Reviewed-by:Yi Gu <yigu@chromium.org> Commit-Queue: Xida Chen <xidachen@chromium.org> Cr-Commit-Position: refs/heads/master@{#671735}
Showing
Please register or sign in to comment