Home | History | Annotate | Download | only in core

Lines Matching defs:bitmap

155 static BitmapXferProc ChooseBitmapXferProc(const SkBitmap& bitmap,
193 switch (bitmap.colorType()) {
223 static void CallBitmapXferProc(const SkBitmap& bitmap, const SkIRect& rect,
226 switch (bitmap.colorType()) {
241 uint8_t* pixels = (uint8_t*)bitmap.getPixels();
243 const size_t rowBytes = bitmap.rowBytes();
266 be faster to operate directly on the device bitmap, rather than invoking
334 const SkBitmap* bitmap = blitter->justAnOpaqueColor(&value);
335 SkASSERT(bitmap);
337 uint16_t* addr = bitmap->getAddr16(0, 0);
338 size_t rb = bitmap->rowBytes();
355 const SkBitmap* bitmap = blitter->justAnOpaqueColor(&value);
356 SkASSERT(bitmap);
358 SkPMColor* addr = bitmap->getAddr32(0, 0);
359 size_t rb = bitmap->rowBytes();
1141 static bool just_translate(const SkMatrix& matrix, const SkBitmap& bitmap) {
1144 return SkTreatAsSprite(matrix, bitmap.width(), bitmap.height(), bits);
1147 void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap,
1149 SkASSERT(bitmap.colorType() == kAlpha_8_SkColorType);
1151 if (just_translate(*fMatrix, bitmap)) {
1155 SkAutoLockPixels alp(bitmap);
1156 if (!bitmap.readyToDraw()) {
1161 mask.fBounds.set(ix, iy, ix + bitmap.width(), iy + bitmap.height());
1163 mask.fRowBytes = SkToU32(bitmap.rowBytes());
1164 mask.fImage = bitmap.getAddr8(0, 0);
1167 } else { // need to xform the bitmap first
1172 SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height()));
1176 // set the mask's bounds to the transformed bitmap-bounds,
1195 // allocate (and clear) our temp buffer to hold the transformed bitmap
1200 // now draw our bitmap(src) into mask(dst), transformed by the matrix
1216 SkAutoBitmapShaderInstall install(bitmap, tmpPaint);
1218 rr.set(0, 0, SkIntToScalar(bitmap.width()),
1219 SkIntToScalar(bitmap.height()));
1241 const SkBitmap& bitmap) {
1243 clip.quickContains(x, y, x + bitmap.width(), y + bitmap.height());
1246 void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
1252 bitmap.width() == 0 || bitmap.height() == 0 ||
1253 bitmap.colorType() == kUnknown_SkColorType) {
1263 if (clipped_out(matrix, *fRC, bitmap.width(), bitmap.height())) {
1267 if (bitmap.colorType() != kAlpha_8_SkColorType && just_translate(matrix, bitmap)) {
1272 SkAutoLockPixels alp(bitmap);
1273 if (!bitmap.readyToDraw()) {
1278 if (clipHandlesSprite(*fRC, ix, iy, bitmap)) {
1281 SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
1285 ir.set(ix, iy, ix + bitmap.width(), iy + bitmap.height());
1298 if (bitmap.colorType() == kAlpha_8_SkColorType) {
1299 draw.drawBitmapAsMask(bitmap, paint);
1301 SkAutoBitmapShaderInstall install(bitmap, paint);
1303 const SkRect srcBounds = SkRect::MakeIWH(bitmap.width(), bitmap.height());
1312 void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y,
1318 bitmap.width() == 0 || bitmap.height() == 0 ||
1319 bitmap.colorType() == kUnknown_SkColorType) {
1324 bounds.set(x, y, x + bitmap.width(), y + bitmap.height());
1333 if (NULL == paint.getColorFilter() && clipHandlesSprite(*fRC, x, y, bitmap)) {
1336 SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
1353 SkAutoBitmapShaderInstall install(bitmap, paint, &matrix);