Commit b68d3752 authored by Mehran Mahmoudi's avatar Mehran Mahmoudi Committed by Commit Bot

[Paint Preview] Fix white rect in the bottom in player

On Android M and prior versions, a white rect appears on the bottom of
the player. This is seemingly caused by using the canvas#setMatrix
method.

This CL removes this call for identity matrix which fixes this problem
for the default scale factor.
However, for non-identity matrices, the white rect will still appear.
Fixing that requires further investigation.

Bug: 1126541
Change-Id: I9c48b3dc90e6fecf450f99059ff8cdf788d94420
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401840Reviewed-by: default avatarCalder Kitagawa <ckitagawa@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805428}
parent 54a6c709
...@@ -99,7 +99,7 @@ class PlayerFrameView extends FrameLayout { ...@@ -99,7 +99,7 @@ class PlayerFrameView extends FrameLayout {
@Override @Override
protected void onDraw(Canvas canvas) { protected void onDraw(Canvas canvas) {
canvas.save(); canvas.save();
canvas.setMatrix(mScaleMatrix); if (!mScaleMatrix.isIdentity()) canvas.setMatrix(mScaleMatrix);
mBitmapPainter.onDraw(canvas); mBitmapPainter.onDraw(canvas);
canvas.restore(); canvas.restore();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment