Index: remoting/client/jni/jni_gl_display_handler.cc |
diff --git a/remoting/client/jni/jni_gl_display_handler.cc b/remoting/client/jni/jni_gl_display_handler.cc |
index 3b511399e4b354c0230d912cb89a46428e725fed..5d5d72bd75320f67bf87691d92a82eaec9de5d2a 100644 |
--- a/remoting/client/jni/jni_gl_display_handler.cc |
+++ b/remoting/client/jni/jni_gl_display_handler.cc |
@@ -159,6 +159,10 @@ void JniGlDisplayHandler::Core::SurfaceCreated( |
void JniGlDisplayHandler::Core::SurfaceChanged(int width, int height) { |
DCHECK(runtime_->display_task_runner()->BelongsToCurrentThread()); |
+ // Note that this doesn't resize the OpenGL viewport. The OpenGL viewport is |
+ // initialized once it is first bound to the surface. We don't need to call |
+ // glViewport() since the activity/surface is recreated and hence the viewport |
+ // is re-initialized every time the surface size is changed. |
renderer_->OnSurfaceChanged(width, height); |
} |