Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

void nr_pixblock_release ( NRPixBlock pb  ) 

Frees memory taken by pixel data in NRPixBlock.

Parameters:
pb Pointer to pixblock.
Precondition:
pb and pb->data.px point to valid addresses.
According to pb->size, one of the functions for freeing the pixelstore is called. May be called regardless of how pixbuf was set up.

Definition at line 182 of file nr-pixblock.cpp.

References NRPixBlock::data, NR_PIXBLOCK_SIZE_16K, NR_PIXBLOCK_SIZE_1M, NR_PIXBLOCK_SIZE_256K, NR_PIXBLOCK_SIZE_4K, NR_PIXBLOCK_SIZE_64K, NR_PIXBLOCK_SIZE_BIG, NR_PIXBLOCK_SIZE_STATIC, NR_PIXBLOCK_SIZE_TINY, NRPixBlock::px, and NRPixBlock::size.

Referenced by nr_pixblock_free(), sp_canvas_paint_single_buffer(), and sp_flood_do_flood_fill().

{
      switch (pb->size) {
      case NR_PIXBLOCK_SIZE_TINY:
            break;
      case NR_PIXBLOCK_SIZE_4K:
            nr_pixelstore_4K_free (pb->data.px);
            break;
      case NR_PIXBLOCK_SIZE_16K:
            nr_pixelstore_16K_free (pb->data.px);
            break;
      case NR_PIXBLOCK_SIZE_64K:
            nr_pixelstore_64K_free (pb->data.px);
            break;
      case NR_PIXBLOCK_SIZE_256K:
            nr_pixelstore_256K_free (pb->data.px);
            break;
      case NR_PIXBLOCK_SIZE_1M:
            nr_pixelstore_1M_free (pb->data.px);
            break;
      case NR_PIXBLOCK_SIZE_BIG:
            g_free (pb->data.px);
            break;
      case NR_PIXBLOCK_SIZE_STATIC:
            break;
      default:
            break;
      }
}


Generated by  Doxygen 1.6.0   Back to index