void SkRecorder::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, const SkPaint* paint, SrcRectConstraint constraint) { #ifdef WRAP_BITMAP_AS_IMAGE // TODO: need a way to support the flags for images... SkAutoTUnref<SkImage> image(SkImage::NewFromBitmap(bitmap)); if (image) { this->onDrawImageRect(image, src, dst, paint); } #else TRY_MINIRECORDER(drawBitmapRect, bitmap, src, dst, paint, constraint); if (kFast_SrcRectConstraint == constraint) { APPEND(DrawBitmapRectFast, this->copy(paint), bitmap, this->copy(src), dst); return; } SkASSERT(kStrict_SrcRectConstraint == constraint); APPEND(DrawBitmapRect, this->copy(paint), bitmap, this->copy(src), dst); #endif }
void SkRecorder::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint) { TRY_MINIRECORDER(drawTextBlob, blob, x, y, paint); APPEND(DrawTextBlob, paint, blob, x, y); }
void SkRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { TRY_MINIRECORDER(drawPath, path, paint); APPEND(DrawPath, paint, path); }
void SkRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) { TRY_MINIRECORDER(drawRect, rect, paint); APPEND(DrawRect, paint, rect); }