Remove x/y/width/height parameters from Clear functions.
[mesa.git] / src / mesa / drivers / directfb / idirectfbgl_mesa.c
index 3c2a77b5bc49d8c2ff23860425ff890d3ed57db7..323cdd6791383e82bfe492b421a311cfeb4355e6 100644 (file)
@@ -372,10 +372,14 @@ dfbSetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h )
 }
 
 static void
-dfbClear( GLcontext *ctx, GLbitfield mask, GLboolean all,
-          GLint x, GLint y, GLint width, GLint height )
+dfbClear( GLcontext *ctx, GLbitfield mask )
 {
      IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx;
+     int x = ctx->DrawBuffer->_Xmin;
+     int y = ctx->DrawBuffer->_Ymin;
+     int width = ctx->DrawBuffer->_Xmax - x;
+     int height = ctx->DrawBuffer->_Ymax - y;
+     GLboolean all = (width == ctx->DrawBuffer->Width && height == ctx->DrawBuffer->height)
      
      if (mask & BUFFER_BIT_FRONT_LEFT &&
          ctx->Color.ColorMask[0]      &&
@@ -420,7 +424,7 @@ dfbClear( GLcontext *ctx, GLbitfield mask, GLboolean all,
      }
      
      if (mask)
-          _swrast_Clear( ctx, mask, all, x, y, width, height );
+          _swrast_Clear( ctx, mask );
 }