OSDN Git Service

dri: unify __DRIcontextRec, __DRIdrawableRec
authorGeorge Sapountzis <gsapountzis@gmail.com>
Thu, 3 Nov 2011 11:11:55 +0000 (13:11 +0200)
committerGeorge Sapountzis <gsapountzis@gmail.com>
Fri, 4 Nov 2011 21:33:04 +0000 (23:33 +0200)
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/common/drisw_util.h

index af012f1..3a33d27 100644 (file)
@@ -113,7 +113,7 @@ extern const struct __DriverAPIRec driDriverAPI;
  */
 struct __DRIdrawableRec {
     /**
-     * Driver's private drawable information.  
+     * Driver's private drawable information.
      *
      * This structure is opaque.
      */
@@ -126,8 +126,18 @@ struct __DRIdrawableRec {
     void *loaderPrivate;
 
     /**
+     * Pointer to context to which this drawable is currently bound.
+     */
+    __DRIcontext *driContextPriv;
+
+    /**
+     * Pointer to screen on which this drawable was created.
+     */
+    __DRIscreen *driScreenPriv;
+
+    /**
      * Reference count for number of context's currently bound to this
-     * drawable.  
+     * drawable.
      *
      * Once it reaches zero, the drawable can be destroyed.
      *
@@ -147,16 +157,6 @@ struct __DRIdrawableRec {
     int w, h;
 
     /**
-     * Pointer to context to which this drawable is currently bound.
-     */
-    __DRIcontext *driContextPriv;
-
-    /**
-     * Pointer to screen on which this drawable was created.
-     */
-    __DRIscreen *driScreenPriv;
-
-    /**
      * Drawable timestamp.  Increased when the loader calls invalidate.
      */
     struct {
@@ -174,6 +174,11 @@ struct __DRIcontextRec {
     void *driverPrivate;
 
     /**
+     * The loaders's private context data.  This structure is opaque.
+     */
+    void *loaderPrivate;
+
+    /**
      * Pointer to drawable currently bound to this context for drawing.
      */
     __DRIdrawable *driDrawablePriv;
@@ -188,11 +193,6 @@ struct __DRIcontextRec {
      */
     __DRIscreen *driScreenPriv;
 
-    /**
-     * The loaders's private context data.  This structure is opaque.
-     */
-    void *loaderPrivate;
-
     struct {
        int draw_stamp;
        int read_stamp;
index 6b3f46b..89917bb 100644 (file)
@@ -132,8 +132,7 @@ struct __DRIdrawableRec {
     /* gallium */
     unsigned int lastStamp;
 
-    int w;
-    int h;
+    int w, h;
 };
 
 #endif /* _DRISW_UTIL_H */