diff -r 000000000000 -r 6474c204b198 gfx/skia/trunk/src/core/SkScanPriv.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gfx/skia/trunk/src/core/SkScanPriv.h Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,40 @@ + +/* + * Copyright 2006 The Android Open Source Project + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + + +#ifndef SkScanPriv_DEFINED +#define SkScanPriv_DEFINED + +#include "SkScan.h" +#include "SkBlitter.h" + +class SkScanClipper { +public: + SkScanClipper(SkBlitter* blitter, const SkRegion* clip, const SkIRect& bounds, + bool skipRejectTest = false); + + SkBlitter* getBlitter() const { return fBlitter; } + const SkIRect* getClipRect() const { return fClipRect; } + +private: + SkRectClipBlitter fRectBlitter; + SkRgnClipBlitter fRgnBlitter; + SkBlitter* fBlitter; + const SkIRect* fClipRect; +}; + +// clipRect == null means path is entirely inside the clip +void sk_fill_path(const SkPath& path, const SkIRect* clipRect, + SkBlitter* blitter, int start_y, int stop_y, int shiftEdgesUp, + const SkRegion& clipRgn); + +// blit the rects above and below avoid, clipped to clip +void sk_blit_above(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); +void sk_blit_below(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); + +#endif