chromium/third_party/skia/src/core/SkBlenderBase.h

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

#ifndef SkBlenderBase_DEFINED
#define SkBlenderBase_DEFINED

#include "include/core/SkBlender.h"
#include "src/base/SkArenaAlloc.h"

#include <memory>
#include <optional>

struct GrFPArgs;
class GrFragmentProcessor;
class SkColorInfo;
class SkRuntimeEffect;
struct SkStageRec;

namespace skgpu::graphite {
enum class DstColorType;
class KeyContext;
class PaintParamsKeyBuilder;
class PipelineDataGatherer;
}

#define SK_ALL_BLENDERS(M)

/**
 * Encapsulates a blend function, including non-public APIs.
 * Blends combine a source color (the result of our paint) and destination color (from the canvas)
 * into a final color.
 */
class SkBlenderBase : public SkBlender {};

inline SkBlenderBase* as_BB(SkBlender* blend) {}

inline const SkBlenderBase* as_BB(const SkBlender* blend) {}

inline const SkBlenderBase* as_BB(const sk_sp<SkBlender>& blend) {}

#endif  // SkBlenderBase_DEFINED