2d8b835cad
Like SkColorFilter, SkShader, etc., this has a public-facing component (SkBlender) and a private subclass (SkBlenderBase) which can be obtained via a helper function (as_BB). At present there are no public- facing methods, but the type needs to be exposed to be usable by the outside world. These classes exist for SkRuntimeEffect to subclass. The blender base provides a `program` method with the parameters that blending will use. Change-Id: I75c772fd4108a9c21fbda84201a8b23d3750a0df Bug: skia:12080 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416916 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
27 lines
676 B
C++
27 lines
676 B
C++
/*
|
|
* 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 SkBlender_DEFINED
|
|
#define SkBlender_DEFINED
|
|
|
|
#include "include/core/SkFlattenable.h"
|
|
|
|
/**
|
|
* SkBlender represents a custom blend function in the Skia pipeline. When an SkBlender is
|
|
* present in a paint, the SkBlendMode is ignored. A blender combines a source color (the
|
|
* result of our paint) and destination color (from the canvas) into a final color.
|
|
*/
|
|
class SK_API SkBlender : public SkFlattenable {
|
|
private:
|
|
SkBlender() = default;
|
|
friend class SkBlenderBase;
|
|
|
|
using INHERITED = SkFlattenable;
|
|
};
|
|
|
|
#endif
|