blob: 4c237e004b759d5fee54f23b14f01252aac2a803 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001/*
2 * Copyright 2006 The Android Open Source Project
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
reed@android.com8a1c16f2008-12-17 15:59:43 +00008
9#ifndef SkScanPriv_DEFINED
10#define SkScanPriv_DEFINED
11
12#include "SkScan.h"
13#include "SkBlitter.h"
14
15class SkScanClipper {
16public:
reed@google.com5ee64912012-06-11 17:30:33 +000017 SkScanClipper(SkBlitter* blitter, const SkRegion* clip, const SkIRect& bounds,
18 bool skipRejectTest = false);
reed@android.com8a1c16f2008-12-17 15:59:43 +000019
20 SkBlitter* getBlitter() const { return fBlitter; }
21 const SkIRect* getClipRect() const { return fClipRect; }
22
23private:
24 SkRectClipBlitter fRectBlitter;
25 SkRgnClipBlitter fRgnBlitter;
Mike Reed28930b42016-11-09 15:23:26 -050026#ifdef SK_DEBUG
Yuqian Li99bba9e2016-11-21 09:44:59 -050027 SkRectClipCheckBlitter fRectClipCheckBlitter;
Mike Reed28930b42016-11-09 15:23:26 -050028#endif
reed@android.com8a1c16f2008-12-17 15:59:43 +000029 SkBlitter* fBlitter;
30 const SkIRect* fClipRect;
31};
32
Yuqian Lie4b8b522016-11-16 10:12:58 -050033void sk_fill_path(const SkPath& path, const SkIRect& clipRect,
reed@android.comdca6a562010-02-22 16:05:48 +000034 SkBlitter* blitter, int start_y, int stop_y, int shiftEdgesUp,
Yuqian Lie4b8b522016-11-16 10:12:58 -050035 bool pathContainedInClip);
36
37void aaa_fill_path(const SkPath& path, const SkIRect& clipRect, AdditiveBlitter*,
38 int start_y, int stop_y, bool pathContainedInClip, bool isUsingMask,
39 bool forceRLE);
reed@android.com8a1c16f2008-12-17 15:59:43 +000040
reed@google.com55b6b582011-03-02 15:58:18 +000041// blit the rects above and below avoid, clipped to clip
42void sk_blit_above(SkBlitter*, const SkIRect& avoid, const SkRegion& clip);
43void sk_blit_below(SkBlitter*, const SkIRect& avoid, const SkRegion& clip);
reed@android.com8a1c16f2008-12-17 15:59:43 +000044
45#endif