Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Unified Diff: include/core/SkDraw.h

Issue 797963002: pass dst-rect through from drawBitmapRect for better precision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/bitmaprect.cpp ('k') | include/core/SkRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkDraw.h
diff --git a/include/core/SkDraw.h b/include/core/SkDraw.h
index 4b8d02b0ae76a2db85f528ceeffef0246064b732..2bb9c89627cf36eca035b09b8481e94e26bbc2a3 100644
--- a/include/core/SkDraw.h
+++ b/include/core/SkDraw.h
@@ -34,7 +34,11 @@ public:
void drawPaint(const SkPaint&) const;
void drawPoints(SkCanvas::PointMode, size_t count, const SkPoint[],
const SkPaint&, bool forceUseDevice = false) const;
- void drawRect(const SkRect&, const SkPaint&) const;
+ void drawRect(const SkRect& prePaintRect, const SkPaint&, const SkMatrix* paintMatrix,
+ const SkRect* postPaintRect) const;
+ void drawRect(const SkRect& rect, const SkPaint& paint) const {
+ this->drawRect(rect, paint, NULL, NULL);
+ }
void drawRRect(const SkRRect&, const SkPaint&) const;
/**
* To save on mallocs, we allow a flag that tells us that srcPath is
@@ -55,7 +59,9 @@ public:
this->drawPath(path, paint, NULL, false, false, customBlitter);
}
- void drawBitmap(const SkBitmap&, const SkMatrix&, const SkPaint&) const;
+ /* If dstOrNull is null, computes a dst by mapping the bitmap's bounds through the matrix. */
+ void drawBitmap(const SkBitmap&, const SkMatrix&, const SkRect* dstOrNull,
+ const SkPaint&) const;
void drawSprite(const SkBitmap&, int x, int y, const SkPaint&) const;
void drawText(const char text[], size_t byteLength, SkScalar x,
SkScalar y, const SkPaint& paint) const;
« no previous file with comments | « gm/bitmaprect.cpp ('k') | include/core/SkRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698