Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package

bool SkBitmap::allocPixels ( SkColorTable ctable = NULL  )  [inline]

Use the standard HeapAllocator to create the pixelref that manages the pixel memory. It will be sized based on the current width/height/config. If this is called multiple times, a new pixelref object will be created each time.

If the bitmap retains a reference to the colortable (assuming it is not null) it will take care of incrementing the reference count.

ctable ColorTable (or null) to use with the pixels that will be allocated. Only used if config == Index8_Config
true if the allocation succeeds. If not the pixelref field of the bitmap will be unchanged.

Definition at line 205 of file SkBitmap.h.

References NULL.

Referenced by copyTo(), SkCanvas::createDevice(), and extractSubset().

        return this->allocPixels(NULL, ctable);

Generated by  Doxygen 1.6.0   Back to index