Lines Matching full:bitmap
171 static BitmapXferProc ChooseBitmapXferProc(const SkBitmap& bitmap,
209 switch (bitmap.config()) {
245 static void CallBitmapXferProc(const SkBitmap& bitmap, const SkIRect& rect,
248 switch (bitmap.config()) {
264 uint8_t* pixels = (uint8_t*)bitmap.getPixels();
266 const size_t rowBytes = bitmap.rowBytes();
291 be faster to operate directly on the device bitmap, rather than invoking
353 const SkBitmap* bitmap = blitter->justAnOpaqueColor(&value);
354 SkASSERT(bitmap);
356 uint16_t* addr = bitmap->getAddr16(0, 0);
357 int rb = bitmap->rowBytes();
363 // *bitmap->getAddr16(x, y) = SkToU16(value);
913 static bool just_translate(const SkMatrix& matrix, const SkBitmap& bitmap) {
922 int w = bitmap.width();
923 int h = bitmap.height();
932 void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap,
934 SkASSERT(bitmap.getConfig() == SkBitmap::kA8_Config);
936 if (just_translate(*fMatrix, bitmap)) {
941 mask.fBounds.set(ix, iy, ix + bitmap.width(), iy + bitmap.height());
943 mask.fRowBytes = bitmap.rowBytes();
944 mask.fImage = bitmap.getAddr8(0, 0);
947 } else { // need to xform the bitmap first
952 SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height()));
956 // set the mask's bounds to the transformed bitmap-bounds,
975 // allocate (and clear) our temp buffer to hold the transformed bitmap
980 // now draw our bitmap(src) into mask(dst), transformed by the matrix
997 SkAutoBitmapShaderInstall install(bitmap, &tmpPaint);
999 bitmap.width()),
1000 SkIntToScalar(bitmap.height()));
1024 void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
1030 bitmap.width() == 0 || bitmap.height() == 0 ||
1031 bitmap.getConfig() == SkBitmap::kNo_Config ||
1037 if (bitmap.width() > 32767 || bitmap.height() > 32767) {
1048 if (clipped_out(matrix, *fClip, bitmap.width(), bitmap.height())) {
1052 if (fBounder && just_translate(matrix, bitmap)) {
1056 ir.set(ix, iy, ix + bitmap.width(), iy + bitmap.height());
1063 SkAutoLockPixels alp(bitmap);
1065 if (!bitmap.readyToDraw()) {
1069 if (bitmap.getConfig() != SkBitmap::kA8_Config &&
1070 just_translate(matrix, bitmap)) {
1074 SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
1080 ir.set(ix, iy, ix + bitmap.width(), iy + bitmap.height());
1093 bitmap.config(), bitmap.width(), bitmap.height(), fBitmap->config(),
1103 if (bitmap.getConfig() == SkBitmap::kA8_Config) {
1104 draw.drawBitmapAsMask(bitmap, paint);
1106 SkAutoBitmapShaderInstall install(bitmap, &paint);
1109 r.set(0, 0, SkIntToScalar(bitmap.width()),
1110 SkIntToScalar(bitmap.height()));
1116 void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y,
1122 bitmap.width() == 0 || bitmap.height() == 0 ||
1123 bitmap.getConfig() == SkBitmap::kNo_Config ||
1129 bounds.set(x, y, x + bitmap.width(), y + bitmap.height());
1139 SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
1160 SkAutoBitmapShaderInstall install(bitmap, &paint);