summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorMaurice Lam <yukl@google.com>2017-05-19 11:18:23 -0700
committerMaurice Lam <yukl@google.com>2017-05-23 17:32:21 -0700
commit198bd0ddb15ad479e0d0d7214645a3c067f271a1 (patch)
tree14034d6dab93fee2f49195c1f8c4680c392b01d5 /library
parent2ca2eae0367c4fff367e12e41910b2d00170f347 (diff)
downloadsetupwizard-198bd0ddb15ad479e0d0d7214645a3c067f271a1.tar.gz
Make scaled illustration videos less jagged
Apply a workaround, forcing the textureview to be scaled in order to apply the anti-aliasing effects to the video. Test: Manual Bug: 35950394 Change-Id: I2a1d04b818d2b27b1acd2f77f8201ba1087f2197
Diffstat (limited to 'library')
-rw-r--r--library/main/src/com/android/setupwizardlib/view/IllustrationVideoView.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/main/src/com/android/setupwizardlib/view/IllustrationVideoView.java b/library/main/src/com/android/setupwizardlib/view/IllustrationVideoView.java
index 989f3e6..6ca31bb 100644
--- a/library/main/src/com/android/setupwizardlib/view/IllustrationVideoView.java
+++ b/library/main/src/com/android/setupwizardlib/view/IllustrationVideoView.java
@@ -66,6 +66,12 @@ public class IllustrationVideoView extends TextureView implements Animatable,
mVideoResId = a.getResourceId(R.styleable.SuwIllustrationVideoView_suwVideo, 0);
a.recycle();
+ // By default the video scales without interpolation, resulting in jagged edges in the
+ // video. This works around it by making the view go through scaling, which will apply
+ // anti-aliasing effects.
+ setScaleX(0.9999999f);
+ setScaleX(0.9999999f);
+
setSurfaceTextureListener(this);
}