diff options
author | Yuqian Li <liyuqian@google.com> | 2018-02-12 17:02:30 +0800 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-14 13:20:17 +0000 |
commit | 36fa0ac9b5716cad25d60dcab98e3f127fb2a000 (patch) | |
tree | 3f304aa8ba8062c0f6a2d3a7f3d657b6e013a949 /src/core/SkScan.h | |
parent | bc8bb02f3fb94eeb0a66871d68284dc903a1f685 (diff) |
Add SkDAARecord to prepare for init-once
This is just refactoring our code so we can easily bring DAA to init-once.
No GMs are expected to change.
Bug: skia:
Change-Id: I05dd1bdfb68bb40b5393ee854de51795b55ed426
Reviewed-on: https://skia-review.googlesource.com/106480
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src/core/SkScan.h')
-rw-r--r-- | src/core/SkScan.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/SkScan.h b/src/core/SkScan.h index c04f09051f..75fd2ac3c6 100644 --- a/src/core/SkScan.h +++ b/src/core/SkScan.h @@ -9,6 +9,7 @@ #ifndef SkScan_DEFINED #define SkScan_DEFINED +#include "SkCoverageDelta.h" #include "SkFixed.h" #include "SkRect.h" #include <atomic> @@ -52,7 +53,7 @@ public: static void AntiFillRect(const SkRect&, const SkRasterClip&, SkBlitter*); static void AntiFillXRect(const SkXRect&, const SkRasterClip&, SkBlitter*); static void FillPath(const SkPath&, const SkRasterClip&, SkBlitter*); - static void AntiFillPath(const SkPath&, const SkRasterClip&, SkBlitter*, bool forceDAA); + static void AntiFillPath(const SkPath&, const SkRasterClip&, SkBlitter*, SkDAARecord*); static void FrameRect(const SkRect&, const SkPoint& strokeSize, const SkRasterClip&, SkBlitter*); static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, @@ -72,8 +73,9 @@ public: // Needed by do_fill_path in SkScanPriv.h static void FillPath(const SkPath&, const SkRegion& clip, SkBlitter*); + // We have this instead of a default nullptr parameter because of function pointer match. static void AntiFillPath(const SkPath& path, const SkRasterClip& rc, SkBlitter* blitter) { - AntiFillPath(path, rc, blitter, false); + AntiFillPath(path, rc, blitter, nullptr); } private: friend class SkAAClip; @@ -85,7 +87,7 @@ private: static void AntiFillRect(const SkRect&, const SkRegion* clip, SkBlitter*); static void AntiFillXRect(const SkXRect&, const SkRegion*, SkBlitter*); static void AntiFillPath(const SkPath&, const SkRegion& clip, SkBlitter*, - bool forceRLE = false, bool forceDAA = false); + bool forceRLE = false, SkDAARecord* daaRecord = nullptr); static void FillTriangle(const SkPoint pts[], const SkRegion*, SkBlitter*); static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, @@ -95,7 +97,7 @@ private: static void AAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect& pathIR, const SkIRect& clipBounds, bool forceRLE); static void DAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect& pathIR, - const SkIRect& clipBounds, bool forceRLE); + const SkIRect& clipBounds, bool forceRLE, SkDAARecord* daaRecord); static void SAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect& pathIR, const SkIRect& clipBounds, bool forceRLE); }; |