From 2c508f2dc22027d61437b79326297ba055041561 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 3 Oct 2011 21:15:46 +0000 Subject: [PATCH] add force-rle parameter to help with aaclip testing git-svn-id: http://skia.googlecode.com/svn/trunk@2401 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkScan.h | 3 ++- src/core/SkScan_AntiPath.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/core/SkScan.h b/include/core/SkScan.h index cd82a70..bf0fe52 100644 --- a/include/core/SkScan.h +++ b/include/core/SkScan.h @@ -62,7 +62,8 @@ public: static void AntiFillRect(const SkRect&, const SkRegion* clip, SkBlitter*); #endif - static void AntiFillPath(const SkPath&, const SkRegion& clip, SkBlitter*); + static void AntiFillPath(const SkPath&, const SkRegion& clip, SkBlitter*, + bool forceRLE = false); static void AntiHairLine(const SkPoint&, const SkPoint&, const SkRegion*, SkBlitter*); diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index fdb2442..2c47af0 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -409,7 +409,7 @@ static int overflows_short_shift(int value, int shift) { } void SkScan::AntiFillPath(const SkPath& path, const SkRegion& clip, - SkBlitter* blitter) { + SkBlitter* blitter, bool forceRLE) { if (clip.isEmpty()) { return; } @@ -460,7 +460,7 @@ void SkScan::AntiFillPath(const SkPath& path, const SkRegion& clip, // MaskSuperBlitter can't handle drawing outside of ir, so we can't use it // if we're an inverse filltype - if (!path.isInverseFillType() && MaskSuperBlitter::CanHandleRect(ir)) { + if (!path.isInverseFillType() && MaskSuperBlitter::CanHandleRect(ir) && !forceRLE) { MaskSuperBlitter superBlit(blitter, ir, clip); SkASSERT(SkIntToScalar(ir.fTop) <= path.getBounds().fTop); sk_fill_path(path, superClipRect, &superBlit, ir.fTop, ir.fBottom, SHIFT, clip); -- 2.7.4