Home | History | Annotate | Download | only in core

Lines Matching refs:bitmap

164 static BitmapXferProc ChooseBitmapXferProc(const SkBitmap& bitmap,
202 switch (bitmap.config()) {
238 static void CallBitmapXferProc(const SkBitmap& bitmap, const SkIRect& rect,
241 switch (bitmap.config()) {
257 uint8_t* pixels = (uint8_t*)bitmap.getPixels();
259 const size_t rowBytes = bitmap.rowBytes();
285 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();
374 const SkBitmap* bitmap = blitter->justAnOpaqueColor(&value);
375 SkASSERT(bitmap);
377 SkPMColor* addr = bitmap->getAddr32(0, 0);
378 int rb = bitmap->rowBytes();
1142 static bool just_translate(const SkMatrix& matrix, const SkBitmap& bitmap) {
1152 int w = bitmap.width();
1153 int h = bitmap.height();
1163 return SkTreatAsSprite(matrix, bitmap.width(), bitmap.height(), bits);
1167 void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap,
1169 SkASSERT(bitmap.getConfig() == SkBitmap::kA8_Config);
1171 if (just_translate(*fMatrix, bitmap)) {
1175 SkAutoLockPixels alp(bitmap);
1176 if (!bitmap.readyToDraw()) {
1181 mask.fBounds.set(ix, iy, ix + bitmap.width(), iy + bitmap.height());
1183 mask.fRowBytes = bitmap.rowBytes();
1184 mask.fImage = bitmap.getAddr8(0, 0);
1187 } else { // need to xform the bitmap first
1192 SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height()));
1196 // set the mask's bounds to the transformed bitmap-bounds,
1215 // allocate (and clear) our temp buffer to hold the transformed bitmap
1220 // now draw our bitmap(src) into mask(dst), transformed by the matrix
1237 SkAutoBitmapShaderInstall install(bitmap, tmpPaint);
1239 rr.set(0, 0, SkIntToScalar(bitmap.width()),
1240 SkIntToScalar(bitmap.height()));
1265 const SkBitmap& bitmap) {
1267 clip.quickContains(x, y, x + bitmap.width(), y + bitmap.height());
1270 void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
1276 bitmap.width() == 0 || bitmap.height() == 0 ||
1277 bitmap.getConfig() == SkBitmap::kNo_Config) {
1283 if (bitmap.width() > 32767 || bitmap.height() > 32767) {
1296 if (clipped_out(matrix, *fRC, bitmap.width(), bitmap.height())) {
1300 if (fBounder && just_translate(matrix, bitmap)) {
1304 ir.set(ix, iy, ix + bitmap.width(), iy + bitmap.height());
1310 if (bitmap.getConfig() != SkBitmap::kA8_Config &&
1311 just_translate(matrix, bitmap)) {
1316 SkAutoLockPixels alp(bitmap);
1317 if (!bitmap.readyToDraw()) {
1322 if (clipHandlesSprite(*fRC, ix, iy, bitmap)) {
1324 SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
1330 ir.set(ix, iy, ix + bitmap.width(), iy + bitmap.height());
1343 if (bitmap.getConfig() == SkBitmap::kA8_Config) {
1344 draw.drawBitmapAsMask(bitmap, paint);
1346 SkAutoBitmapShaderInstall install(bitmap, paint);
1349 r.set(0, 0, SkIntToScalar(bitmap.width()),
1350 SkIntToScalar(bitmap.height()));
1356 void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y,
1362 bitmap.width() == 0 || bitmap.height() == 0 ||
1363 bitmap.getConfig() == SkBitmap::kNo_Config) {
1368 bounds.set(x, y, x + bitmap.width(), y + bitmap.height());
1377 if (NULL == paint.getColorFilter() && clipHandlesSprite(*fRC, x, y, bitmap)) {
1379 SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
1394 SkAutoBitmapShaderInstall install(bitmap, paint);