chromium/third_party/skia/modules/sksg/include/SkSGRenderEffect.h

/*
 * Copyright 2019 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkSGRenderEffect_DEFINED
#define SkSGRenderEffect_DEFINED

#include "include/core/SkBlendMode.h"
#include "include/core/SkBlender.h"
#include "include/core/SkColor.h"
#include "include/core/SkImageFilter.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkShader.h"
#include "include/core/SkTileMode.h"
#include "include/effects/SkImageFilters.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkPoint_impl.h"
#include "modules/sksg/include/SkSGEffectNode.h"
#include "modules/sksg/include/SkSGNode.h"

#include <optional>

class SkCanvas;
class SkMatrix;

// TODO: merge EffectNode.h with this header

namespace sksg {
class InvalidationController;
class RenderNode;

/**
 * Shader base class.
 */
class Shader : public Node {};

/**
 * Attaches a shader to the render DAG.
 */
class ShaderEffect final : public EffectNode {};

/**
 * Attaches a mask shader to the render DAG.
 */
class MaskShaderEffect final : public EffectNode {};

/**
 * ImageFilter base class.
 */
class ImageFilter : public Node {};

/**
 * Attaches an ImageFilter (chain) to the render DAG.
 */
class ImageFilterEffect final : public EffectNode {};

/**
 * Wrapper for externally-managed SkImageFilters.
 */
class ExternalImageFilter final : public ImageFilter {};

/**
 * SkDropShadowImageFilter node.
 */
class DropShadowImageFilter final : public ImageFilter {};

/**
 * SkBlurImageFilter node.
 */
class BlurImageFilter final : public ImageFilter {};

/**
 * Applies an SkBlender to descendant render nodes.
 */
class BlenderEffect final : public EffectNode {};

class LayerEffect final : public EffectNode {};

} // namespace sksg

#endif // SkSGRenderEffect_DEFINED