gfx/skia/skia/src/core/SkScanPriv.h
author Lee Salzman <lsalzman@mozilla.com>
Thu, 30 Jul 2015 11:51:29 -0400
changeset 255559 b8802b591ce273baec00243ce338845741dee21d
parent 169409 gfx/skia/trunk/src/core/SkScanPriv.h@3f5e3a855a3d1afe36142b581637498bb5aeba39
child 295394 cf560124d28f3737353c105eec79677a7731d2e8
permissions -rw-r--r--
Bug 1188462 - Rename gfx/skia/trunk directory to gfx/skia/skia. r=jrmuizel


/*
 * 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