From ac9d306a92e569e85a7611e9db00943b5b551f1e Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 4 Nov 2013 20:10:33 +0000 Subject: speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values. R=bsalomon@google.com, mtklein@google.com Review URL: https://codereview.chromium.org/56453002 git-svn-id: http://skia.googlecode.com/svn/trunk@12118 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkRect.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/core/SkRect.h') diff --git a/include/core/SkRect.h b/include/core/SkRect.h index 98acb1cda3..8bfa57a8f9 100644 --- a/include/core/SkRect.h +++ b/include/core/SkRect.h @@ -730,7 +730,7 @@ struct SK_API SkRect { /** * Set the dst rectangle by rounding this rectangle's coordinates to their - * nearest integer values using SkScalarRound. + * nearest integer values using SkScalarRoundToInt. */ void round(SkIRect* dst) const { SkASSERT(dst); @@ -772,6 +772,15 @@ struct SK_API SkRect { SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom)); } + /** + * Return a new SkIRect which is contains the rounded coordinates of this + * rect using SkScalarRoundToInt. + */ + SkIRect round() const { + SkIRect ir; + this->round(&ir); + return ir; + } /** * Swap top/bottom or left/right if there are flipped (i.e. if width() -- cgit v1.2.3