summaryrefslogtreecommitdiff
path: root/graphics/java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2020-04-17 19:20:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-04-17 19:20:38 +0000
commit9c52543162ebf56630578cb7b3fd086e41842c17 (patch)
tree0b6a0d56a6843d0b82ddedfd15a711ddc45a791b /graphics/java
parent56ef0ea4b6d1a73d898c7c06e8e64589ce83cacd (diff)
parent62f8b4f3d604c5b056f00ecc712318f6064a23af (diff)
Merge "Document that getTransformMatrix can inset" into rvc-dev
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/SurfaceTexture.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/SurfaceTexture.java b/graphics/java/android/graphics/SurfaceTexture.java
index 697daa8b7b70..cd878c5a77cb 100644
--- a/graphics/java/android/graphics/SurfaceTexture.java
+++ b/graphics/java/android/graphics/SurfaceTexture.java
@@ -307,6 +307,11 @@ public class SurfaceTexture {
* The matrix is stored in column-major order so that it may be passed directly to OpenGL ES via
* the glLoadMatrixf or glUniformMatrix4fv functions.
*
+ * If the underlying buffer has a crop associated with it, the transformation will also include
+ * a slight scale to cut off a 1-texel border around the edge of the crop. This ensures that
+ * when the texture is bilinear sampled that no texels outside of the buffer's valid region
+ * are accessed by the GPU, avoiding any sampling artifacts when scaling.
+ *
* @param mtx the array into which the 4x4 matrix will be stored. The array must have exactly
* 16 elements.
*/