[Mesa-dev] [PATCH 3/4] mesa: remove useless comments in the viewport code path

Samuel Pitoiset samuel.pitoiset at gmail.com
Thu Jun 22 14:35:38 UTC 2017


No need to explain why calling a driver callback is needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mesa/main/viewport.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 2b3d1556d91..33aa1269520 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -121,12 +121,8 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
    for (i = 0; i < ctx->Const.MaxViewports; i++)
       set_viewport_no_notify(ctx, i, x, y, width, height);
 
-   if (ctx->Driver.Viewport) {
-      /* Many drivers will use this call to check for window size changes
-       * and reallocate the z/stencil/accum/etc buffers if needed.
-       */
+   if (ctx->Driver.Viewport)
       ctx->Driver.Viewport(ctx);
-   }
 }
 
 
@@ -146,12 +142,8 @@ _mesa_set_viewport(struct gl_context *ctx, unsigned idx, GLfloat x, GLfloat y,
 {
    set_viewport_no_notify(ctx, idx, x, y, width, height);
 
-   if (ctx->Driver.Viewport) {
-      /* Many drivers will use this call to check for window size changes
-       * and reallocate the z/stencil/accum/etc buffers if needed.
-       */
+   if (ctx->Driver.Viewport)
       ctx->Driver.Viewport(ctx);
-   }
 }
 
 void GLAPIENTRY
-- 
2.13.1



More information about the mesa-dev mailing list