1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/core/SkScanPriv.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2006 The Android Open Source Project 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 + 1.12 + 1.13 +#ifndef SkScanPriv_DEFINED 1.14 +#define SkScanPriv_DEFINED 1.15 + 1.16 +#include "SkScan.h" 1.17 +#include "SkBlitter.h" 1.18 + 1.19 +class SkScanClipper { 1.20 +public: 1.21 + SkScanClipper(SkBlitter* blitter, const SkRegion* clip, const SkIRect& bounds, 1.22 + bool skipRejectTest = false); 1.23 + 1.24 + SkBlitter* getBlitter() const { return fBlitter; } 1.25 + const SkIRect* getClipRect() const { return fClipRect; } 1.26 + 1.27 +private: 1.28 + SkRectClipBlitter fRectBlitter; 1.29 + SkRgnClipBlitter fRgnBlitter; 1.30 + SkBlitter* fBlitter; 1.31 + const SkIRect* fClipRect; 1.32 +}; 1.33 + 1.34 +// clipRect == null means path is entirely inside the clip 1.35 +void sk_fill_path(const SkPath& path, const SkIRect* clipRect, 1.36 + SkBlitter* blitter, int start_y, int stop_y, int shiftEdgesUp, 1.37 + const SkRegion& clipRgn); 1.38 + 1.39 +// blit the rects above and below avoid, clipped to clip 1.40 +void sk_blit_above(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); 1.41 +void sk_blit_below(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); 1.42 + 1.43 +#endif