Subversion Repositories Kolibri OS

Rev

Rev 879 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
808 serge 1
 
879 serge 2
 
3
     u32_t ifl;
877 serge 4
     u32_t *ring, write;
879 serge 5
6
     local_pixmap_t *dstpixmap;
7
 
877 serge 8
     dstpixmap = (io->dstpix == (void*)-1) ? &scr_pixmap : io->dstpix ;
879 serge 9
 
10
     ifl = safe_cli();
11
 
12
#if R300_PIO
13
 
14
     R5xxFIFOWait(6);
15
 
16
     OUTREG(R5XX_DP_GUI_MASTER_CNTL,
17
 
18
            RADEON_GMC_BRUSH_SOLID_COLOR      |
19
            RADEON_GMC_DST_32BPP              |
20
            RADEON_GMC_SRC_DATATYPE_COLOR     |
21
            R5XX_GMC_CLR_CMP_CNTL_DIS         |
22
            R5XX_GMC_WR_MSK_DIS               |
23
            R5XX_ROP3_P
24
           );
25
26
     OUTREG(R5XX_DP_BRUSH_FRGD_CLR, io->color);
27
 
28
     OUTREG(R5XX_DST_PITCH_OFFSET, dstpixmap->pitch_offset);
29
     OUTREG(R5XX_DST_Y_X, 0);
30
     OUTREG(R5XX_DST_WIDTH_HEIGHT,(dstpixmap->width<<16)|dstpixmap->height);
31
32
#else
33
 
34
        OUT_RING(CP_PACKET3(RADEON_CNTL_PAINT_MULTI, 4));
35
36
        OUT_RING(RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
37
 
38
                 RADEON_GMC_DST_32BPP              |
39
                 RADEON_GMC_SRC_DATATYPE_COLOR     |
40
                 R5XX_GMC_CLR_CMP_CNTL_DIS         |
41
                 R5XX_GMC_WR_MSK_DIS               |
42
                 R5XX_ROP3_P
43
                );
44
45
        OUT_RING(dstpixmap->pitch_offset);
46
 
47
        OUT_RING( 0 );
48
        OUT_RING((dstpixmap->width<<16)|dstpixmap->height);
49
      COMMIT_RING();
50
51
#endif
52
 
53
     safe_sti(ifl);
54
 
55
     return ERR_OK;
56
 
57
58
59
 
60
 
61
     local_pixmap_t *dstpixmap;
62
     clip_t clip;
63
     int x0, y0, x1, y1;
877 serge 64
65
     dstpixmap = (draw->dstpix == (void*)-1) ? &scr_pixmap : draw->dstpix ;
808 serge 66
 
877 serge 67
     x0 = draw->x0;
68
 
69
70
     x1 = draw->x1;
71
 
72
73
     clip.xmin = 0;
74
 
75
     clip.xmax = dstpixmap->width-1;
76
     clip.ymax = dstpixmap->height-1;
77
78
     if ( !LineClip(&clip, &x0, &y0, &x1, &y1 ))
79
 
80
        u32_t efl;
81
        u32_t *ring, write;
82
83
        efl = safe_cli();
84
 
85
#if R300_PIO
86
 
87
        R5xxFIFOWait(6);
88
 
89
        OUTREG(R5XX_DP_GUI_MASTER_CNTL,
90
 
91
               RADEON_GMC_BRUSH_SOLID_COLOR      |
879 serge 92
               RADEON_GMC_DST_32BPP              |
93
               RADEON_GMC_SRC_DATATYPE_COLOR     |
94
               R5XX_GMC_CLR_CMP_CNTL_DIS         |
95
               R5XX_GMC_WR_MSK_DIS               |
96
               R5XX_ROP3_P
97
              );
877 serge 98
99
        OUTREG(R5XX_DST_LINE_PATCOUNT, 0x55 << R5XX_BRES_CNTL_SHIFT);
100
 
101
        OUTREG(R5XX_DP_BRUSH_FRGD_CLR, draw->color);
102
 
103
104
        OUTREG(R5XX_DST_LINE_START,(y0<<16)|x0);
105
 
106
#else
107
       BEGIN_RING();
108
         OUT_RING(CP_PACKET3(RADEON_CNTL_PAINT_POLYLINE, 4));
109
         OUT_RING(RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
110
                  RADEON_GMC_BRUSH_SOLID_COLOR      |
111
                  RADEON_GMC_DST_32BPP              |
112
                  RADEON_GMC_SRC_DATATYPE_COLOR     |
113
                  R5XX_GMC_CLR_CMP_CNTL_DIS         |
114
                  R5XX_GMC_WR_MSK_DIS               |
115
                  R5XX_ROP3_P);
116
117
         OUT_RING(dstpixmap->pitch_offset);
118
 
119
         OUT_RING((y0<<16)|x0);
120
         OUT_RING((y1<<16)|x1);
121
       COMMIT_RING();
122
123
#endif
124
 
125
     };
126
     return ERR_OK;
127
}
128
129
int DrawRect(io_draw_t* draw)
130
 
879 serge 131
     int x0, y0, x1, y1, xend, yend;
808 serge 132
878 serge 133
     local_pixmap_t *dstpixmap;
808 serge 134
 
876 serge 135
136
     dstpixmap = (draw->dstpix == (void*)-1) ? &scr_pixmap : draw->dstpix ;
817 serge 137
 
876 serge 138
     x0 = draw->x0;
817 serge 139
 
876 serge 140
141
     x1 = xend = x0 + draw->w - 1;
808 serge 142
 
878 serge 143
144
     dst_clip.xmin = 0;
808 serge 145
 
876 serge 146
     dst_clip.xmax = dstpixmap->width-1;
147
     dst_clip.ymax = dstpixmap->height-1;
148
149
150
 
151
 
808 serge 152
153
     if( ! BlockClip( &dst_clip, &x0, &y0, &x1, &y1))
154
 
876 serge 155
        u32_t *ring, write;
156
        u32_t ifl;
157
        int w, h;
158
159
        w = x1 - x0 + 1;
808 serge 160
 
878 serge 161
162
        ifl = safe_cli();
808 serge 163
 
876 serge 164
#if R300_PIO
808 serge 165
 
813 serge 166
        R5xxFIFOWait(6);
812 serge 167
 
876 serge 168
        OUTREG(R5XX_DP_GUI_MASTER_CNTL,
812 serge 169
 
876 serge 170
               RADEON_GMC_BRUSH_SOLID_COLOR      |
879 serge 171
               RADEON_GMC_DST_32BPP              |
172
               RADEON_GMC_SRC_DATATYPE_COLOR     |
173
               R5XX_GMC_CLR_CMP_CNTL_DIS         |
174
               R5XX_GMC_WR_MSK_DIS               |
175
               R5XX_ROP3_P
176
              );
177
876 serge 178
        OUTREG(R5XX_DP_BRUSH_FRGD_CLR, draw->color);
812 serge 179
 
876 serge 180
        OUTREG(R5XX_DST_PITCH_OFFSET, dstpixmap->pitch_offset);
181
        OUTREG(R5XX_DST_Y_X,(y0<<16)|x0);
182
        OUTREG(R5XX_DST_WIDTH_HEIGHT,(w<<16)|h);
878 serge 183
876 serge 184
        if( draw->color != draw->border)
878 serge 185
 
186
           OUTREG(R5XX_DP_BRUSH_FRGD_CLR, draw->border);
187
188
           if( y0 == draw->y0)
189
 
190
              R5xxFIFOWait(2);
191
192
              OUTREG(R5XX_DST_Y_X,(y0<<16)|x0);
193
 
194
              y0++;
195
              h--;
196
           }
197
           if( y1 == yend )
198
           {
199
              R5xxFIFOWait(2);
200
201
              OUTREG(R5XX_DST_Y_X,(y1<<16)|x0);
202
 
203
              h--;
204
           }
205
           if( (h > 0) && (x0 == draw->x0))
206
           {
880 serge 207
              R5xxFIFOWait(2);
878 serge 208
209
              OUTREG(R5XX_DST_Y_X,(y0<<16)|x0);
210
 
211
           }
212
           if( (h > 0) && (x1 == xend))
213
           {
880 serge 214
              R5xxFIFOWait(2);
878 serge 215
216
              OUTREG(R5XX_DST_Y_X,(y0<<16)|x1);
217
 
218
           }
219
        };
220
#else
221
      BEGIN_RING();
812 serge 222
        OUT_RING(CP_PACKET3(RADEON_CNTL_PAINT_MULTI, 4));
876 serge 223
224
        OUT_RING(RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
812 serge 225
 
876 serge 226
                 RADEON_GMC_DST_32BPP              |
227
                 RADEON_GMC_SRC_DATATYPE_COLOR     |
228
                 R5XX_GMC_CLR_CMP_CNTL_DIS         |
229
                 R5XX_GMC_WR_MSK_DIS               |
230
                 R5XX_ROP3_P
231
                );
232
233
        OUT_RING(dstpixmap->pitch_offset);
808 serge 234
 
876 serge 235
        OUT_RING((draw->x0<<16)|y0);
236
        OUT_RING((w<<16)|h);
237
      COMMIT_RING();
238
#endif
239
        safe_sti(ifl);
812 serge 240
     };
876 serge 241
     return ERR_OK;
242
}
243
808 serge 244
int FillRect(io_fill_t *fill)
245
 
879 serge 246
     local_pixmap_t *dstpixmap;
808 serge 247
     clip_t dst_clip;
876 serge 248
     int x0, y0, x1, y1, xend, yend;
249
879 serge 250
     dstpixmap = (fill->dstpix == (void*)-1) ? &scr_pixmap : fill->dstpix ;
808 serge 251
 
876 serge 252
     x0 = fill->x;
817 serge 253
 
876 serge 254
255
     xend = x1 = x0 + fill->w - 1;
808 serge 256
 
879 serge 257
258
     dst_clip.xmin = 0;
808 serge 259
 
876 serge 260
     dst_clip.xmax = dstpixmap->width-1;
261
     dst_clip.ymax = dstpixmap->height-1;
262
263
//  dbgprintf("fill rect x0:%d, y0:%d, x1:%d, y1:%d\n",
264
 
808 serge 265
266
     if( ! BlockClip(&dst_clip, &x0, &y0, &x1, &y1))
267
 
876 serge 268
        u32_t *ring, write;
269
        u32_t ifl = safe_cli();
270
271
#if R300_PIO
808 serge 272
 
813 serge 273
        int w = x1 - x0 + 1;
812 serge 274
 
879 serge 275
276
        R5xxFIFOWait(9);
876 serge 277
 
278
        OUTREG(R5XX_DP_GUI_MASTER_CNTL,
279
 
280
               R5XX_GMC_BRUSH_8X8_MONO_FG_BG    |
281
               RADEON_GMC_DST_32BPP             |
282
               R5XX_GMC_SRC_DATATYPE_COLOR      |
283
               R5XX_GMC_CLR_CMP_CNTL_DIS        |
284
               R5XX_GMC_WR_MSK_DIS              |
285
               R5XX_ROP3_P
286
               );
287
288
        OUTREG(R5XX_DP_BRUSH_BKGD_CLR, fill->bkcolor);
289
 
290
291
        OUTREG(R5XX_BRUSH_DATA0, fill->bmp0);
292
 
293
294
        OUTREG(R5XX_DP_CNTL, R5XX_DST_X_LEFT_TO_RIGHT | R5XX_DST_Y_TOP_TO_BOTTOM);
295
 
296
297
        OUTREG(R5XX_DST_Y_X,(y0<<16)|x0);
298
 
299
300
        if( (fill->border & 0xFF000000) != 0)
879 serge 301
 
302
           R5xxFIFOWait(2);
303
304
           OUTREG(R5XX_DP_GUI_MASTER_CNTL,
305
 
306
                  RADEON_GMC_BRUSH_SOLID_COLOR      |
307
                  RADEON_GMC_DST_32BPP              |
308
                  RADEON_GMC_SRC_DATATYPE_COLOR     |
309
                  R5XX_GMC_CLR_CMP_CNTL_DIS         |
310
                  R5XX_GMC_WR_MSK_DIS               |
311
                  R5XX_ROP3_P
312
                 );
313
314
           OUTREG(R5XX_DP_BRUSH_FRGD_CLR, fill->border);
315
 
316
           if( y0 == fill->y)
317
 
318
              R5xxFIFOWait(2);
319
320
              OUTREG(R5XX_DST_Y_X,(y0<<16)|x0);
321
 
322
              y0++;
323
              h--;
324
           }
325
           if( y1 == yend )
326
           {
327
              R5xxFIFOWait(2);
328
329
              OUTREG(R5XX_DST_Y_X,(y1<<16)|x0);
330
 
331
              h--;
332
           }
333
           if( (h > 0) && (x0 == fill->x))
334
           {
880 serge 335
              R5xxFIFOWait(2);
879 serge 336
337
              OUTREG(R5XX_DST_Y_X,(y0<<16)|x0);
338
 
339
           }
340
           if( (h > 0) && (x1 == xend))
341
           {
880 serge 342
              R5xxFIFOWait(2);
879 serge 343
344
              OUTREG(R5XX_DST_Y_X,(y0<<16)|x1);
345
 
346
           }
347
        };
348
349
350
 
351
 
812 serge 352
        OUT_RING(CP_PACKET3(RADEON_CNTL_PAINT, 7));
876 serge 353
        OUT_RING(RADEON_GMC_DST_PITCH_OFFSET_CNTL    |
354
                 R5XX_GMC_BRUSH_8X8_MONO_FG_BG       |
355
                 RADEON_GMC_DST_32BPP                |
356
                 RADEON_GMC_SRC_DATATYPE_COLOR       |
357
                 R5XX_GMC_CLR_CMP_CNTL_DIS           |
358
                 R5XX_GMC_WR_MSK_DIS                 |
359
                 R5XX_ROP3_P
360
                );
361
362
        OUT_RING(dstpixmap->pitch_offset);
812 serge 363
 
876 serge 364
        OUT_RING(fill->fcolor);
365
366
        OUT_RING(fill->bmp0);
808 serge 367
 
876 serge 368
369
        OUT_RING((y0<<16)|x0);
808 serge 370
 
876 serge 371
      COMMIT_RING();
372
373
#endif
808 serge 374
 
812 serge 375
     };
876 serge 376
     return ERR_OK;
377
};
378
379
812 serge 380
 
808 serge 381
 
382
 
879 serge 383
     clip_t src_clip, dst_clip;
817 serge 384
876 serge 385
     local_pixmap_t *srcpixmap;
815 serge 386
 
876 serge 387
388
     //dbgprintf("Pixblit src: %x dst: %x\n",blit->srcpix, blit->dstpix);
815 serge 389
 
817 serge 390
     dstpixmap = (blit->dstpix == (void*)-1) ? &scr_pixmap : blit->dstpix ;
815 serge 391
 
392
393
     //dbgprintf("srcpixmap: %x dstpixmap: %x\n",srcpixmap, dstpixmap);
394
 
817 serge 395
     //dbgprintf("dst.width: %d dst.height: %d\n", dstpixmap->width,dstpixmap->height);
815 serge 396
 
817 serge 397
     //dbgprintf("srcpitch: %x dstpitch: %x\n",
398
     //           srcpixmap->pitch_offset,dstpixmap->pitch_offset);
399
400
     src_clip.xmin = 0;
815 serge 401
 
876 serge 402
     src_clip.xmax = srcpixmap->width-1;
403
     src_clip.ymax = srcpixmap->height-1;
404
405
     dst_clip.xmin = 0;
815 serge 406
 
876 serge 407
     dst_clip.xmax = dstpixmap->width-1;
408
     dst_clip.ymax = dstpixmap->height-1;
409
410
     if( !blit_clip(&dst_clip, &blit->dst_x, &blit->dst_y,
411
 
412
                    &blit->w, &blit->h) )
413
     {
414
        u32_t *ring, write;
415
416
        u32_t ifl = safe_cli();
417
 
418
#if R300_PIO
419
 
868 serge 420
        R5xxFIFOWait(7);
815 serge 421
 
876 serge 422
        OUTREG(R5XX_DP_GUI_MASTER_CNTL,
868 serge 423
 
876 serge 424
               RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
425
               RADEON_GMC_BRUSH_NONE             |
426
               RADEON_GMC_DST_32BPP              |
427
               RADEON_GMC_SRC_DATATYPE_COLOR     |
428
               RADEON_DP_SRC_SOURCE_MEMORY       |
429
               R5XX_GMC_CLR_CMP_CNTL_DIS         |
430
               R5XX_GMC_WR_MSK_DIS               |
431
               R5XX_ROP3_S
432
              );
433
434
        OUTREG(R5XX_DP_CNTL, R5XX_DST_X_LEFT_TO_RIGHT | R5XX_DST_Y_TOP_TO_BOTTOM);
868 serge 435
 
876 serge 436
        OUTREG(R5XX_DST_PITCH_OFFSET, dstpixmap->pitch_offset);
868 serge 437
 
876 serge 438
439
        OUTREG(R5XX_SRC_Y_X,(blit->src_y<<16)|blit->src_x);
868 serge 440
 
876 serge 441
        OUTREG(R5XX_DST_HEIGHT_WIDTH,(blit->h<<16)|blit->w);
442
443
#else
868 serge 444
 
445
        BEGIN_RING();
446
 
876 serge 447
448
          OUT_RING(RADEON_GMC_SRC_PITCH_OFFSET_CNTL  |
815 serge 449
 
876 serge 450
                   RADEON_GMC_BRUSH_NONE             |
451
                   RADEON_GMC_DST_32BPP              |
452
                   RADEON_GMC_SRC_DATATYPE_COLOR     |
453
                   RADEON_DP_SRC_SOURCE_MEMORY       |
454
                   R5XX_GMC_CLR_CMP_CNTL_DIS         |
455
                   R5XX_GMC_WR_MSK_DIS               |
456
                   R5XX_ROP3_S
457
                  );
458
459
          OUT_RING(srcpixmap->pitch_offset);
815 serge 460
 
876 serge 461
462
          OUT_RING((blit->src_x<<16)|blit->src_y);
815 serge 463
 
876 serge 464
          OUT_RING((blit->w<<16)|blit->h);
465
        COMMIT_RING();
466
467
#endif
815 serge 468
 
868 serge 469
     };
876 serge 470
     return ERR_OK;
471
};
472
473
868 serge 474
 
829 serge 475
 
879 serge 476
     clip_t src_clip, dst_clip;
829 serge 477
876 serge 478
     local_pixmap_t *srcpixmap;
829 serge 479
 
876 serge 480
481
    // dbgprintf("Transblit src: %x dst: %x\n",blit->srcpix, blit->dstpix);
829 serge 482
 
868 serge 483
     dstpixmap = (blit->dstpix == (void*)-1) ? &scr_pixmap : blit->dstpix ;
829 serge 484
 
485
486
     //dbgprintf("srcpixmap: %x dstpixmap: %x\n",srcpixmap, dstpixmap);
487
 
488
     //dbgprintf("dst.width: %d dst.height: %d\n", dstpixmap->width,dstpixmap->height);
489
 
490
     //dbgprintf("srcpitch: %x dstpitch: %x\n",
491
     //           srcpixmap->pitch_offset,dstpixmap->pitch_offset);
492
     src_clip.xmin = 0;
493
     src_clip.ymin = 0;
876 serge 494
     src_clip.xmax = srcpixmap->width-1;
495
     src_clip.ymax = srcpixmap->height-1;
496
497
     dst_clip.xmin = 0;
829 serge 498
 
876 serge 499
     dst_clip.xmax = dstpixmap->width-1;
500
     dst_clip.ymax = dstpixmap->height-1;
501
502
     if( !blit_clip(&dst_clip, &blit->dst_x, &blit->dst_y,
829 serge 503
 
876 serge 504
                    &blit->w, &blit->h) )
505
     {
506
        u32_t *ring, write;
507
508
        u32_t ifl = safe_cli();
509
 
510
#if R300_PIO
511
 
868 serge 512
        R5xxFIFOWait(10);
513
 
876 serge 514
        OUTREG(R5XX_DP_GUI_MASTER_CNTL,
868 serge 515
 
876 serge 516
               RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
517
               RADEON_GMC_BRUSH_NONE             |
518
               RADEON_GMC_DST_32BPP              |
519
               RADEON_GMC_SRC_DATATYPE_COLOR     |
520
               RADEON_DP_SRC_SOURCE_MEMORY       |
521
               R5XX_GMC_WR_MSK_DIS               |
522
               R5XX_ROP3_S
523
              );
524
525
        OUTREG(R5XX_DP_CNTL, R5XX_DST_X_LEFT_TO_RIGHT | R5XX_DST_Y_TOP_TO_BOTTOM);
868 serge 526
 
876 serge 527
        OUTREG(R5XX_CLR_CMP_CLR_SRC, 0xFF000000);
868 serge 528
 
876 serge 529
        OUTREG(R5XX_CLR_CMP_CNTL, R5XX_SRC_CMP_EQ_COLOR | R5XX_CLR_CMP_SRC_SOURCE);
530
531
        OUTREG(R5XX_DST_PITCH_OFFSET, dstpixmap->pitch_offset);
868 serge 532
 
876 serge 533
534
        OUTREG(R5XX_SRC_Y_X,(blit->src_y<<16)|blit->src_x);
868 serge 535
 
876 serge 536
        OUTREG(R5XX_DST_HEIGHT_WIDTH,(blit->h<<16)|blit->w);
537
538
#else
868 serge 539
 
540
        BEGIN_RING();
541
 
876 serge 542
543
          OUT_RING(RADEON_GMC_SRC_PITCH_OFFSET_CNTL  |
829 serge 544
 
876 serge 545
                   RADEON_GMC_BRUSH_NONE             |
546
                   RADEON_GMC_DST_32BPP              |
547
                   RADEON_GMC_SRC_DATATYPE_COLOR     |
548
                   RADEON_DP_SRC_SOURCE_MEMORY       |
549
                   R5XX_GMC_WR_MSK_DIS               |
550
                   R5XX_ROP3_S
551
                  );
552
553
          OUT_RING(srcpixmap->pitch_offset);
829 serge 554
 
876 serge 555
556
          OUT_RING(R5XX_CLR_CMP_SRC_SOURCE | R5XX_SRC_CMP_EQ_COLOR);
829 serge 557
 
876 serge 558
          OUT_RING(0xFF000000);
559
560
          OUT_RING((blit->src_x<<16)|blit->src_y);
829 serge 561
 
876 serge 562
          OUT_RING((blit->w<<16)|blit->h);
563
564
        COMMIT_RING();
868 serge 565
 
876 serge 566
#endif
829 serge 567
 
868 serge 568
       safe_sti(ifl);
569
 
876 serge 570
     return ERR_OK;
571
}
572
829 serge 573
574
 
879 serge 575
 
576
int LockPixmap(userpixmap_t *io)
577
 
578
   pixmap_t *pixmap;
579
   size_t    size;
580
   void     *usermap;
581
582
   dbgprintf("Lock pixmap %x\n", io->pixmap);
583
 
584
   if(io->pixmap == (pixmap_t*)-1)
585
 
586
   else
587
     pixmap = io->pixmap;
588
589
   if( (pixmap->flags & 1) == PX_LOCK )
590
 
591
592
   size = (pixmap->pitch*pixmap->width+4095) & ~ 4095;
593
 
594
   {
595
     CommitPages(usermap, ((u32_t)pixmap->raw+rhd.PhisBase)|7|(1<<9), size);
596
     pixmap->flags |= PX_LOCK;
597
     pixmap->usermap = usermap;
598
     io->usermap = usermap;
599
     io->pitch   = pixmap->pitch;
600
     dbgprintf("map at %x\n", io->usermap);
601
602
     return ERR_OK;
603
 
604
   else
605
     return ERR_PARAM;
606
};
607
608
int UnlockPixmap(userpixmap_t *io)
609
 
610
  pixmap_t *pixmap;
611
  size_t    size;
612
613
  dbgprintf("Unlock pixmap %x\n", io->pixmap);
614
 
615
  if(io->pixmap == (pixmap_t*)-1)
616
 
617
  else
618
    pixmap = io->pixmap;
619
620
  if( (pixmap->flags & 1) != PX_LOCK )
621
 
622
623
/*   Sanity checks  */
624
 
625
  if( (pixmap->usermap == 0)||
626
 
627
      ((u32_t)pixmap->usermap & 4095)
628
    )
629
    return ERR_PARAM;
630
631
  size = (pixmap->pitch*pixmap->width+4095) & ~ 4095;
632
 
633
  UnmapPages(pixmap->usermap, size);
634
 
635
  pixmap->usermap =  NULL;
636
  pixmap->flags  &= ~PX_LOCK;
637
  io->usermap     =  NULL;
638
  io->pitch       =  0;
639
640
  return ERR_OK;
641
 
642
643
#endif
644
 
645
>