- if (pcp) {
-
- if (pcp->driDrawablePriv != pdp
- || pcp->driReadablePriv != prp)
- {
- /* first increment ref count for new drawables */
-
- if (pdp)
- {
- pdp->driContextPriv = pcp;
- dri_get_drawable(pdp);
- }
-
- if (prp && prp != pdp)
- {
- dri_get_drawable(prp);
- }
-
- /* free old drawables */
-
- if (pcp->driReadablePriv
- && pcp->driReadablePriv != pcp->driDrawablePriv)
- {
- dri_put_drawable(pcp->driReadablePriv);
- }
-
- if (pcp->driDrawablePriv)
- {
- dri_put_drawable(pcp->driDrawablePriv);
- }
-
- /* assign new drawables to context */
-
- pcp->driDrawablePriv = pdp;
- pcp->driReadablePriv = prp;
-
- }
+ if (pcp) {
+ pcp->driDrawablePriv = pdp;
+ pcp->driReadablePriv = prp;
+ if (pdp) {
+ pdp->driContextPriv = pcp;
+ dri_get_drawable(pdp);