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

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

#ifndef SkSGColorFilter_DEFINED
#define SkSGColorFilter_DEFINED

#include "include/core/SkColorFilter.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "modules/sksg/include/SkSGEffectNode.h"
#include "modules/sksg/include/SkSGNode.h"

#include <vector>

class SkCanvas;
class SkMatrix;
enum class SkBlendMode;
struct SkPoint;

namespace sksg {

class Color;
class InvalidationController;
class RenderNode;

/**
 * Base class for nodes which apply a color filter when rendering their descendants.
 */
class ColorFilter : public EffectNode {};

/**
 * Wrapper for externally-managed SkColorFilters.
 *
 * Allows attaching non-sksg color filters to the render tree.
 */
class ExternalColorFilter final : public EffectNode {};

/**
 * Concrete SkBlendModeColorFilter Effect node.
 */
class ModeColorFilter final : public ColorFilter {};

/**
 * Tint/multi-tone color effect: maps RGB colors to the [C0,C1][C1,C2]..[Cn-1,Cn] gradient
 * based on input luminance (where the colors are evenly distributed across the luminance domain),
 * then mixes with the input based on weight.  Leaves alpha unchanged.
 */
class GradientColorFilter final : public ColorFilter {};

} // namespace sksg

#endif // SkSGColorFilter_DEFINED