aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRadialShadowMapShader.h
blob: 4d6956ca82e02f868aa5aaba00d12c91d5009b20 (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
28
29
30
31
/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "SkReadBuffer.h"

#ifndef SkRadialShadowMapShader_DEFINED
#define SkRadialShadowMapShader_DEFINED

#ifdef SK_EXPERIMENTAL_SHADOWING

class SkLights;
class SkShader;

class SK_API SkRadialShadowMapShader {
public:
    /** This shader creates a 1D strip depth map for radial lights.
     *  It can only take in 1 light to generate one shader at a time.
     */
    static sk_sp<SkShader> Make(sk_sp<SkShader> occluderShader,
                                sk_sp<SkLights> light,
                                int diffuseWidth, int diffuseHeight);

    SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
};

#endif
#endif