aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkMorphology_opts.h
blob: e3ad853cf64472f2eaa527a3f6a37d7245376bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * Copyright 2013 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.
 */

#include <SkColor.h>

/**
 * All morphology procs have the same signature: src is the source buffer, dst the
 * destination buffer, radius is the morphology radius, width and height are the bounds
 * of the destination buffer (in pixels), and srcStride and dstStride are the
 * number of pixels per row in each buffer. All buffers are 8888.
 */

typedef void (*SkMorphologyProc)(const SkPMColor* src, SkPMColor* dst, int radius,
                                 int width, int height, int srcStride, int dstStride);

enum SkMorphologyProcType {
    kDilateX_SkMorphologyProcType,
    kDilateY_SkMorphologyProcType,
    kErodeX_SkMorphologyProcType,
    kErodeY_SkMorphologyProcType
};

SkMorphologyProc SkMorphologyGetPlatformProc(SkMorphologyProcType type);