Lines Matching refs:bitmap
33 bool shouldDrawImmediately(const SkBitmap* bitmap, const SkPaint* paint,
35 if (bitmap && ((bitmap->getTexture() && !bitmap->isImmutable()) ||
36 (bitmap->getSize() > bitmapSizeThreshold))) {
170 virtual void writePixels(const SkBitmap& bitmap, int x, int y,
175 virtual bool onReadPixels(const SkBitmap& bitmap,
202 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap,
206 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap,
396 void DeferredDevice::writePixels(const SkBitmap& bitmap,
399 if (x <= 0 && y <= 0 && (x + bitmap.width()) >= width() &&
400 (y + bitmap.height()) >= height()) {
404 if (SkBitmap::kARGB_8888_Config == bitmap.config() &&
409 fImmediateDevice->writePixels(bitmap, x, y, config8888);
415 if (shouldDrawImmediately(&bitmap, NULL, getBitmapSizeThreshold())) {
417 fImmediateCanvas->drawSprite(bitmap, x, y, &paint);
419 this->recordingCanvas()->drawSprite(bitmap, x, y, &paint);
444 const SkBitmap& bitmap, int x, int y, SkCanvas::Config8888 config8888) {
446 return fImmediateCanvas->readPixels(const_cast<SkBitmap*>(&bitmap),
452 AutoImmediateDrawIfNeeded(SkDeferredCanvas& canvas, const SkBitmap* bitmap,
454 this->init(canvas, bitmap, paint);
467 void init(SkDeferredCanvas& canvas, const SkBitmap* bitmap, const SkPaint* paint)
471 shouldDrawImmediately(bitmap, paint, device->getBitmapSizeThreshold())) {
791 void SkDeferredCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar left,
794 SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height()));
797 isPaintOpaque(paint, &bitmap)) {
801 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
802 this->drawingCanvas()->drawBitmap(bitmap, left, top, paint);
806 void SkDeferredCanvas::drawBitmapRectToRect(const SkBitmap& bitmap,
812 isPaintOpaque(paint, &bitmap)) {
816 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
817 this->drawingCanvas()->drawBitmapRectToRect(bitmap, src, dst, paint);
822 void SkDeferredCanvas::drawBitmapMatrix(const SkBitmap& bitmap,
825 // TODO: reset recording canvas if paint+bitmap is opaque and clip rect
826 // covers canvas entirely and transformed bitmap covers canvas entirely
827 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
828 this->drawingCanvas()->drawBitmapMatrix(bitmap, m, paint);
832 void SkDeferredCanvas::drawBitmapNine(const SkBitmap& bitmap,
835 // TODO: reset recording canvas if paint+bitmap is opaque and clip rect
837 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
838 this->drawingCanvas()->drawBitmapNine(bitmap, center, dst, paint);
842 void SkDeferredCanvas::drawSprite(const SkBitmap& bitmap, int left, int top,
847 SkIntToScalar(bitmap.width()),
848 SkIntToScalar(bitmap.height()));
851 isPaintOpaque(paint, &bitmap)) {
855 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
856 this->drawingCanvas()->drawSprite(bitmap, left, top, paint);