diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-04 20:57:36 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-04 20:57:36 +0000 |
commit | 84e922bfb3e7a03f6e35beb2f1e4f2657e7cd3e9 (patch) | |
tree | e57c3c2c12fd8da316c8ee01f0eae00b346f6130 /include | |
parent | d48c16b2ff83a78f71870ce86002a545a4513b3c (diff) |
Revert "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."
This reverts commit d615e839b71f75df895de6850b774a9e1c28ad2a.
Revert "must initialize SkDraw.fClip"
This reverts commit 108e46d29b5f57927fc8b8c403bb52019d8cb16d.
BUG=
Review URL: https://codereview.chromium.org/57883006
git-svn-id: http://skia.googlecode.com/svn/trunk@12122 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkDraw.h | 24 | ||||
-rw-r--r-- | include/core/SkRect.h | 11 |
2 files changed, 5 insertions, 30 deletions
diff --git a/include/core/SkDraw.h b/include/core/SkDraw.h index 9183094679..772e11e00d 100644 --- a/include/core/SkDraw.h +++ b/include/core/SkDraw.h @@ -43,15 +43,8 @@ public: * affect the geometry/rasterization, then the pre matrix can just be * pre-concated with the current matrix. */ - void drawPath(const SkPath& path, const SkPaint& paint, - const SkMatrix* prePathMatrix, bool pathIsMutable) const { - this->drawPath(path, paint, prePathMatrix, pathIsMutable, false); - } - - void drawPath(const SkPath& path, const SkPaint& paint) const { - this->drawPath(path, paint, NULL, false, false); - } - + void drawPath(const SkPath& srcPath, const SkPaint&, + const SkMatrix* prePathMatrix, bool pathIsMutable) const; void drawBitmap(const SkBitmap&, const SkMatrix&, const SkPaint&) const; void drawSprite(const SkBitmap&, int x, int y, const SkPaint&) const; void drawText(const char text[], size_t byteLength, SkScalar x, @@ -72,14 +65,8 @@ public: const uint16_t indices[], int ptCount, const SkPaint& paint) const; - /** - * Overwrite the target with the path's coverage (i.e. its mask). - * Will overwrite the entire device, so it need not be zero'd first. - * - * Only device A8 is supported right now. - */ - void drawPathCoverage(const SkPath& src, const SkPaint& paint) const { - this->drawPath(src, paint, NULL, false, true); + void drawPath(const SkPath& src, const SkPaint& paint) const { + this->drawPath(src, paint, NULL, false); } /** Helper function that creates a mask from a path and an optional maskfilter. @@ -120,9 +107,6 @@ private: void drawDevMask(const SkMask& mask, const SkPaint&) const; void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; - void drawPath(const SkPath&, const SkPaint&, const SkMatrix* preMatrix, - bool pathIsMutable, bool drawCoverage) const; - /** * Return the current clip bounds, in local coordinates, with slop to account * for antialiasing or hairlines (i.e. device-bounds outset by 1, and then diff --git a/include/core/SkRect.h b/include/core/SkRect.h index 8bfa57a8f9..98acb1cda3 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 SkScalarRoundToInt. + * nearest integer values using SkScalarRound. */ void round(SkIRect* dst) const { SkASSERT(dst); @@ -772,15 +772,6 @@ 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() |