Commit 92eb09fa by hschlueter Committed by Ian Baker

Fix output viewport size of empty FrameProcessorChain.

Since the output size can be overridden, the viewport should be
ouputWidth/Height and NOT the ExternalCopyFrameProcessor's output size
which matches the input size.

PiperOrigin-RevId: 437256635
parent 67acfc67
......@@ -398,18 +398,16 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
private void processFrame() {
checkState(Thread.currentThread().equals(glThread));
Size outputSize = inputSizes.get(0);
if (frameProcessors.isEmpty()) {
GlUtil.focusEglSurface(
eglDisplay, eglContext, eglSurface, outputSize.getWidth(), outputSize.getHeight());
GlUtil.focusEglSurface(eglDisplay, eglContext, eglSurface, outputWidth, outputHeight);
} else {
GlUtil.focusFramebuffer(
eglDisplay,
eglContext,
eglSurface,
framebuffers[0],
outputSize.getWidth(),
outputSize.getHeight());
inputSizes.get(0).getWidth(),
inputSizes.get(0).getHeight());
}
inputSurfaceTexture.updateTexImage();
inputSurfaceTexture.getTransformMatrix(textureTransformMatrix);
......@@ -418,7 +416,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
externalCopyFrameProcessor.updateProgramAndDraw(presentationTimeNs);
for (int i = 0; i < frameProcessors.size() - 1; i++) {
outputSize = inputSizes.get(i + 1);
Size outputSize = inputSizes.get(i + 1);
GlUtil.focusFramebuffer(
eglDisplay,
eglContext,
......
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