intel: Clean up intel_flush_front
authorChad Versace <chad.versace@linux.intel.com>
Thu, 9 Aug 2012 16:21:21 +0000 (09:21 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 14 Aug 2012 23:19:25 +0000 (16:19 -0700)
Stop repeating ourselves. Replace the 4 instances of
`driContext->driDrawablePriv` with `driDrawable`.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_context.c

index c37d89d1150e4cc7c99d00f1edffc415c1e4f681..acd59174c707a509760456f50ab2f544c34612f3 100644 (file)
@@ -276,14 +276,15 @@ intel_flush_front(struct gl_context *ctx)
 {
    struct intel_context *intel = intel_context(ctx);
     __DRIcontext *driContext = intel->driContext;
+    __DRIdrawable *driDrawable = driContext->driDrawablePriv;
     __DRIscreen *const screen = intel->intelScreen->driScrnPriv;
 
     if (_mesa_is_winsys_fbo(ctx->DrawBuffer) && intel->front_buffer_dirty) {
       if (screen->dri2.loader->flushFrontBuffer != NULL &&
-          driContext->driDrawablePriv &&
-         driContext->driDrawablePriv->loaderPrivate) {
-        (*screen->dri2.loader->flushFrontBuffer)(driContext->driDrawablePriv,
-                                                 driContext->driDrawablePriv->loaderPrivate);
+          driDrawable &&
+          driDrawable->loaderPrivate) {
+         screen->dri2.loader->flushFrontBuffer(driDrawable,
+                                               driDrawable->loaderPrivate);
 
         /* We set the dirty bit in intel_prepare_render() if we're
          * front buffer rendering once we get there.