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

SkBitmap Class Reference

#include <SkBitmap.h>

Inherited by NativeImageSkia.

List of all members.

Detailed Description

The SkBitmap class specifies a raster bitmap. A bitmap has an integer width and height, and a format (config), and a pointer to the actual pixels. Bitmaps can be drawn into a SkCanvas, but they are also used to specify the target of a SkCanvas' drawing operations.

Definition at line 40 of file SkBitmap.h.

Public Types

enum  Config {
  kNo_Config, kA1_Config, kA8_Config, kIndex8_Config,
  kRGB_565_Config, kARGB_4444_Config, kARGB_8888_Config, kRLE_Index8_Config,

Public Member Functions

bool allocPixels (Allocator *allocator, SkColorTable *ctable)
bool allocPixels (SkColorTable *ctable=NULL)
void buildMipMap (bool forceRebuild=false)
int bytesPerPixel () const
bool canCopyTo (Config newConfig) const
Config config () const
bool copyTo (SkBitmap *dst, Config c, Allocator *allocator=NULL) const
bool empty () const
void eraseARGB (U8CPU a, U8CPU r, U8CPU g, U8CPU b) const
void eraseColor (SkColor c) const
void eraseRGB (U8CPU r, U8CPU g, U8CPU b) const
void extractAlpha (SkBitmap *dst, const SkPaint *paint, SkIPoint *offset) const
void extractAlpha (SkBitmap *dst) const
int extractMipLevel (SkBitmap *dst, SkFixed sx, SkFixed sy)
bool extractSubset (SkBitmap *dst, const SkIRect &subset) const
void flatten (SkFlattenableWriteBuffer &) const
void freeMipMap ()
void * getAddr (int x, int y) const
uint8_t * getAddr1 (int x, int y) const
uint16_t * getAddr16 (int x, int y) const
uint32_t * getAddr32 (int x, int y) const
uint8_t * getAddr8 (int x, int y) const
SkColorTablegetColorTable () const
Config getConfig () const
uint32_t getGenerationID () const
SkPMColor getIndex8Color (int x, int y) const
void * getPixels () const
size_t getSize () const
Sk64 getSize64 () const
bool hasMipMap () const
int height () const
bool isNull () const
bool isOpaque () const
void lockPixels () const
void notifyPixelsChanged () const
SkBitmapoperator= (const SkBitmap &src)
SkPixelRefpixelRef () const
size_t pixelRefOffset () const
bool readyToDraw () const
void reset ()
int rowBytes () const
int rowBytesAsPixels () const
bool scrollRect (const SkIRect *subset, int dx, int dy, SkRegion *inval=NULL) const
void setConfig (Config, int width, int height, int rowBytes=0)
void setIsOpaque (bool)
SkPixelRefsetPixelRef (SkPixelRef *pr, size_t offset=0)
void setPixels (void *p, SkColorTable *ctable=NULL)
int shiftPerPixel () const
 SkBitmap (const SkBitmap &src)
 SkBitmap ()
 SkDEBUGCODE (void validate() const ;) class Allocator
void swap (SkBitmap &other)
void unflatten (SkFlattenableReadBuffer &)
void unlockPixels () const
int width () const
 ~SkBitmap ()

Static Public Member Functions

static int ComputeBytesPerPixel (Config c)
static int ComputeRowBytes (Config c, int width)
static int ComputeShiftPerPixel (Config c)
static size_t ComputeSize (Config, int width, int height)
static Sk64 ComputeSize64 (Config, int width, int height)

Private Types

enum  Flags { kImageIsOpaque_Flag = 0x01 }

Private Member Functions

void freePixels ()
void updatePixelsFromRef () const

Static Private Member Functions

static SkFixed ComputeMipLevel (SkFixed sx, SkFixed dy)

Private Attributes

uint8_t fBytesPerPixel
uint8_t fConfig
uint8_t fFlags
uint32_t fHeight
MipMap * fMipMap
int fPixelLockCount
size_t fPixelRefOffset
void * fPixels
uint32_t fRowBytes
uint32_t fWidth


class  HeapAllocator
struct  MipMap
class  RLEPixels

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index