Home | History | Annotate | Download | only in core

Lines Matching defs:bitmap

92 #define CHECK_LOCKCOUNT_BALANCE(bitmap)  AutoCheckLockCountBalance clcb(bitmap)
95 #define CHECK_LOCKCOUNT_BALANCE(bitmap)
113 by the device's XY offset and bitmap-bounds.
200 bitmap/device to draw into from this level. This value is NOT
475 SkBitmap bitmap;
476 bitmap.setInfo(SkImageInfo::MakeUnknown(width, height));
477 this->init(SkNEW_ARGS(SkBitmapDevice, (bitmap)))->unref();
488 SkCanvas::SkCanvas(const SkBitmap& bitmap)
493 this->init(SkNEW_ARGS(SkBitmapDevice, (bitmap)))->unref();
616 bool SkCanvas::readPixels(SkBitmap* bitmap, int x, int y) {
617 if (kUnknown_SkColorType == bitmap->colorType() || bitmap->getTexture()) {
622 if (NULL == bitmap->pixelRef()) {
623 if (!bitmap->allocPixels()) {
629 SkBitmap bm(*bitmap);
636 bitmap->setPixelRef(NULL);
641 bool SkCanvas::readPixels(const SkIRect& srcRect, SkBitmap* bitmap) {
645 bitmap->reset();
649 if (!bitmap->allocN32Pixels(r.width(), r.height())) {
650 // bitmap will already be reset.
653 if (!this->readPixels(bitmap->info(), bitmap->getPixels(), bitmap->rowBytes(), r.x(), r.y())) {
654 bitmap->reset();
705 bool SkCanvas::writePixels(const SkBitmap& bitmap, int x, int y) {
706 if (bitmap.getTexture()) {
709 SkBitmap bm(bitmap);
1083 bool SkAutoROCanvasPixels::asROBitmap(SkBitmap* bitmap) const {
1085 return bitmap->installPixels(fInfo, const_cast<void*>(fAddr), fRowBytes);
1087 bitmap->reset();
1156 void SkCanvas::internalDrawBitmap(const SkBitmap& bitmap,
1158 if (bitmap.drawsNothing()) {
1167 SkDEBUGCODE(bitmap.validate();)
1168 CHECK_LOCKCOUNT_BALANCE(bitmap);
1173 bitmap.getBounds(&storage);
1181 iter.fDevice->drawBitmap(iter, bitmap, matrix, looper.paint());
1229 void SkCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
1231 if (bitmap.drawsNothing()) {
1234 SkDEBUGCODE(bitmap.validate();)
1235 CHECK_LOCKCOUNT_BALANCE(bitmap);
1254 SkIRect clipBounds = SkIRect::MakeWH(bitmap.width(), bitmap.height());
1262 if (filter->filterImage(&proxy, bitmap, ctx, &dst, &offset)) {
1269 iter.fDevice->drawSprite(iter, bitmap, pos.x(), pos.y(), *paint);
2024 void SkCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
2026 SkDEBUGCODE(bitmap.validate();)
2031 x + SkIntToScalar(bitmap.width()),
2032 y + SkIntToScalar(bitmap.height())
2044 this->internalDrawBitmap(bitmap, matrix, paint);
2048 void SkCanvas::internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
2051 if (bitmap.drawsNothing() || dst.isEmpty()) {
2055 CHECK_LOCKCOUNT_BALANCE(bitmap);
2076 iter.fDevice->drawBitmapRect(iter, bitmap, src, dst, looper.paint(), flags);
2082 void SkCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
2085 SkDEBUGCODE(bitmap.validate();)
2086 this->internalDrawBitmapRect(bitmap, src, dst, paint, flags);
2089 void SkCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& matrix,
2091 SkDEBUGCODE(bitmap.validate();)
2092 this->internalDrawBitmap(bitmap, matrix, paint);
2095 void SkCanvas::internalDrawBitmapNine(const SkBitmap& bitmap,
2098 if (bitmap.drawsNothing()) {
2112 const int32_t w = bitmap.width();
2113 const int32_t h = bitmap.height();
2116 // pin center to the bounds of the bitmap
2159 this->internalDrawBitmapRect(bitmap, &s, d, paint,
2165 void SkCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
2167 SkDEBUGCODE(bitmap.validate();)
2170 this->internalDrawBitmapNine(bitmap, center, dst, paint);
2575 SkBitmap bitmap;
2576 if (!bitmap.allocPixels(info)) {
2581 if (!bitmap.info().isOpaque()) {
2582 bitmap.eraseColor(0);
2584 return SkNEW_ARGS(SkCanvas, (bitmap));
2592 SkBitmap bitmap;
2593 if (!bitmap.installPixels(info, pixels, rowBytes)) {
2596 return SkNEW_ARGS(SkCanvas, (bitmap));