Commit 1a416b17 by tofunmi Committed by christosts

Update max overlays in one OverlayTextureProcessor

Tested adding 3, 15,16 different overlays in a single OverlayTextureProcessor. The program errored out when 16 overlays were added.

PiperOrigin-RevId: 504810157
parent a5d43b21
...@@ -56,11 +56,11 @@ import com.google.common.collect.ImmutableList; ...@@ -56,11 +56,11 @@ import com.google.common.collect.ImmutableList;
throws FrameProcessingException { throws FrameProcessingException {
super(useHdr); super(useHdr);
checkArgument(!useHdr, "OverlayTextureProcessor does not support HDR colors yet."); checkArgument(!useHdr, "OverlayTextureProcessor does not support HDR colors yet.");
// TODO: If the limit on the number of overlays ever becomes and issue, investigate expanding it // The maximum number of samplers allowed in a single GL program is 16.
// in relation to common device limits. // We use one for every overlay and one for the video.
checkArgument( checkArgument(
overlays.size() <= 8, overlays.size() <= 15,
"OverlayTextureProcessor does not more than 8 overlays in the same processor yet."); "OverlayTextureProcessor does not support more than 15 overlays in the same processor.");
this.overlays = overlays; this.overlays = overlays;
aspectRatioMatrix = GlUtil.create4x4IdentityMatrix(); aspectRatioMatrix = GlUtil.create4x4IdentityMatrix();
overlayMatrix = GlUtil.create4x4IdentityMatrix(); overlayMatrix = GlUtil.create4x4IdentityMatrix();
......
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 sign in to comment