diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-23 19:20:19 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-23 19:20:19 +0000 |
commit | dceecc70a881508998323fd07dba270b07c53d7f (patch) | |
tree | 85d02430c06757c26067e92a2c0eef5e231f314e /src/core | |
parent | 5b56d9e43fee4393f25f41d400981ce3960cd1aa (diff) |
always allocate (only) the width of the clip for the AA row, since it will
already be clamped to 32K (our impl limit at the moment.)
add unittest to confirm this fix
git-svn-id: http://skia.googlecode.com/svn/trunk@3242 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkScan_AntiPath.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index 77171b3984..56c8f5d977 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -78,11 +78,13 @@ BaseSuperBlitter::BaseSuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion& clip) { fRealBlitter = realBlitter; - // take the union of the ir bounds and clip, since we may be called with an - // inverse filltype - const int left = SkMin32(ir.fLeft, clip.getBounds().fLeft); - const int right = SkMax32(ir.fRight, clip.getBounds().fRight); - + /* + * We use the clip bounds instead of the ir, since we may be asked to + * draw outside of the rect if we're a inverse filltype + */ + const int left = clip.getBounds().fLeft; + const int right = clip.getBounds().fRight; + fLeft = left; fSuperLeft = left << SHIFT; fWidth = right - left; |