1ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com
2ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com/*
3ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Copyright 2006 The Android Open Source Project
4ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com *
5ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Use of this source code is governed by a BSD-style license that can be
6ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * found in the LICENSE file.
7ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com */
8ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com
98a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
108a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#ifndef SkScanPriv_DEFINED
118a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#define SkScanPriv_DEFINED
128a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
138a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#include "SkScan.h"
148a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#include "SkBlitter.h"
158a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
168a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comclass SkScanClipper {
178a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.compublic:
185ee6491b7a1e7c177abc0186c2749ebe1f71fcf7reed@google.com    SkScanClipper(SkBlitter* blitter, const SkRegion* clip, const SkIRect& bounds,
195ee6491b7a1e7c177abc0186c2749ebe1f71fcf7reed@google.com                  bool skipRejectTest = false);
208a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
218a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    SkBlitter*      getBlitter() const { return fBlitter; }
228a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    const SkIRect*  getClipRect() const { return fClipRect; }
238a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
248a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comprivate:
258a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    SkRectClipBlitter   fRectBlitter;
268a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    SkRgnClipBlitter    fRgnBlitter;
278a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    SkBlitter*          fBlitter;
288a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    const SkIRect*      fClipRect;
298a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com};
308a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
318a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com// clipRect == null means path is entirely inside the clip
328a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comvoid sk_fill_path(const SkPath& path, const SkIRect* clipRect,
33dca6a56b71b922aab32098d6a55bbb041f3a2b48reed@android.com                  SkBlitter* blitter, int start_y, int stop_y, int shiftEdgesUp,
348a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com                  const SkRegion& clipRgn);
358a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
3655b6b58d8f6e7529c9b9cea606a6e3637c8e2e39reed@google.com// blit the rects above and below avoid, clipped to clip
3755b6b58d8f6e7529c9b9cea606a6e3637c8e2e39reed@google.comvoid sk_blit_above(SkBlitter*, const SkIRect& avoid, const SkRegion& clip);
3855b6b58d8f6e7529c9b9cea606a6e3637c8e2e39reed@google.comvoid sk_blit_below(SkBlitter*, const SkIRect& avoid, const SkRegion& clip);
398a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
408a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif
41