f7f36ae077
Runtime Blend effects always take two input colors--source and destination--instead of one. This CL adds a new ProgramKind for blend effects, a new program module (empty for now), and adds a test to confirm that the signature for blend functions is checked. Currently these are only accessible via skslc; there's no Runtime Effect API to create one and the dest color isn't hooked up to anything. Change-Id: I5272a811d2d76b878cfdf3429efa78c9c8b3fd97 Bug: skia:12080 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416798 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
32 lines
681 B
C++
32 lines
681 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 SkSLProgramKind_DEFINED
|
|
#define SkSLProgramKind_DEFINED
|
|
|
|
#include <cinttypes>
|
|
|
|
namespace SkSL {
|
|
|
|
/**
|
|
* SkSL supports several different program kinds.
|
|
*/
|
|
enum class ProgramKind : int8_t {
|
|
kFragment,
|
|
kVertex,
|
|
kGeometry,
|
|
kFragmentProcessor,
|
|
kRuntimeColorFilter, // Runtime effect only suitable as SkColorFilter
|
|
kRuntimeShader, // " " " " " SkShader
|
|
kRuntimeBlend, // " " " " " a blending function
|
|
kGeneric,
|
|
};
|
|
|
|
} // namespace SkSL
|
|
|
|
#endif
|