Remove SkRuntimeEffect.h include from SkColorFilterPriv.h
Also, less importantly, from SkRTShader.h Change-Id: I0d7a56583cdd681bae6b2a08861daca33cc25fc6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260779 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
e6a2ad81ab
commit
8d97c155be
@ -486,6 +486,19 @@ SkRuntimeColorFilterFactory::SkRuntimeColorFilterFactory(SkString sksl,
|
||||
: fEffect(SkRuntimeEffect::Make(std::move(sksl)))
|
||||
, fCpuFunc(cpuFunc) {}
|
||||
|
||||
SkRuntimeColorFilterFactory::~SkRuntimeColorFilterFactory() = default;
|
||||
|
||||
SkRuntimeColorFilterFactory::SkRuntimeColorFilterFactory(const SkRuntimeColorFilterFactory&) =
|
||||
default;
|
||||
|
||||
SkRuntimeColorFilterFactory::SkRuntimeColorFilterFactory(SkRuntimeColorFilterFactory&&) = default;
|
||||
|
||||
SkRuntimeColorFilterFactory& SkRuntimeColorFilterFactory::operator=(
|
||||
const SkRuntimeColorFilterFactory&) = default;
|
||||
|
||||
SkRuntimeColorFilterFactory& SkRuntimeColorFilterFactory::operator=(SkRuntimeColorFilterFactory&&) =
|
||||
default;
|
||||
|
||||
sk_sp<SkColorFilter> SkRuntimeColorFilterFactory::make(sk_sp<SkData> inputs) {
|
||||
return sk_sp<SkColorFilter>(new SkRuntimeColorFilter(fEffect, std::move(inputs), fCpuFunc));
|
||||
}
|
||||
|
@ -11,7 +11,8 @@
|
||||
|
||||
#include "include/core/SkColorFilter.h"
|
||||
#include "include/core/SkString.h"
|
||||
#include "src/core/SkRuntimeEffect.h"
|
||||
|
||||
class SkRuntimeEffect;
|
||||
|
||||
using SkRuntimeColorFilterFn = void(*)(float[4], const void*);
|
||||
|
||||
@ -27,6 +28,14 @@ public:
|
||||
*/
|
||||
SkRuntimeColorFilterFactory(SkString sksl, SkRuntimeColorFilterFn cpuFunc = nullptr);
|
||||
|
||||
SkRuntimeColorFilterFactory(const SkRuntimeColorFilterFactory&);
|
||||
SkRuntimeColorFilterFactory(SkRuntimeColorFilterFactory&&);
|
||||
|
||||
~SkRuntimeColorFilterFactory();
|
||||
|
||||
SkRuntimeColorFilterFactory& operator=(const SkRuntimeColorFilterFactory&);
|
||||
SkRuntimeColorFilterFactory& operator=(SkRuntimeColorFilterFactory&&);
|
||||
|
||||
/**
|
||||
* Creates a color filter instance with the specified inputs. In GPU rendering, the inputs are
|
||||
* used to populate the values of 'in' variables. For instance, given the color filter:
|
||||
|
@ -32,6 +32,8 @@ SkRTShader::SkRTShader(sk_sp<SkRuntimeEffect> effect, sk_sp<SkData> inputs,
|
||||
, fInputs(std::move(inputs)) {
|
||||
}
|
||||
|
||||
SkRTShader::~SkRTShader() = default;
|
||||
|
||||
bool SkRTShader::onAppendStages(const SkStageRec& rec) const {
|
||||
SkMatrix inverse;
|
||||
if (!this->computeTotalInverse(rec.fCTM, rec.fLocalM, &inverse)) {
|
||||
@ -124,6 +126,14 @@ SkRuntimeShaderFactory::SkRuntimeShaderFactory(SkString sksl, bool isOpaque)
|
||||
: fEffect(SkRuntimeEffect::Make(std::move(sksl)))
|
||||
, fIsOpaque(isOpaque) {}
|
||||
|
||||
SkRuntimeShaderFactory::SkRuntimeShaderFactory(const SkRuntimeShaderFactory&) = default;
|
||||
SkRuntimeShaderFactory::SkRuntimeShaderFactory(SkRuntimeShaderFactory&&) = default;
|
||||
|
||||
SkRuntimeShaderFactory::~SkRuntimeShaderFactory() = default;
|
||||
|
||||
SkRuntimeShaderFactory& SkRuntimeShaderFactory::operator=(const SkRuntimeShaderFactory&) = default;
|
||||
SkRuntimeShaderFactory& SkRuntimeShaderFactory::operator=(SkRuntimeShaderFactory&&) = default;
|
||||
|
||||
sk_sp<SkShader> SkRuntimeShaderFactory::make(sk_sp<SkData> inputs, const SkMatrix* localMatrix) {
|
||||
return fEffect && fEffect->isValid()
|
||||
? sk_sp<SkShader>(new SkRTShader(fEffect, std::move(inputs), localMatrix, fIsOpaque))
|
||||
|
@ -10,13 +10,13 @@
|
||||
|
||||
#include "include/core/SkString.h"
|
||||
#include "include/private/SkMutex.h"
|
||||
#include "src/core/SkRuntimeEffect.h"
|
||||
#include "src/shaders/SkShaderBase.h"
|
||||
|
||||
struct GrFPArgs;
|
||||
class GrFragmentProcessor;
|
||||
class SkData;
|
||||
class SkMatrix;
|
||||
class SkRuntimeEffect;
|
||||
|
||||
namespace SkSL { class ByteCode; }
|
||||
|
||||
@ -25,6 +25,7 @@ class SkRTShader : public SkShaderBase {
|
||||
public:
|
||||
SkRTShader(sk_sp<SkRuntimeEffect> effect, sk_sp<SkData> inputs, const SkMatrix* localMatrix,
|
||||
bool isOpaque);
|
||||
~SkRTShader() override;
|
||||
|
||||
bool isOpaque() const override { return fIsOpaque; }
|
||||
|
||||
@ -53,6 +54,13 @@ private:
|
||||
class SK_API SkRuntimeShaderFactory {
|
||||
public:
|
||||
SkRuntimeShaderFactory(SkString sksl, bool isOpaque);
|
||||
SkRuntimeShaderFactory(const SkRuntimeShaderFactory&);
|
||||
SkRuntimeShaderFactory(SkRuntimeShaderFactory&&);
|
||||
|
||||
~SkRuntimeShaderFactory();
|
||||
|
||||
SkRuntimeShaderFactory& operator=(const SkRuntimeShaderFactory&);
|
||||
SkRuntimeShaderFactory& operator=(SkRuntimeShaderFactory&&);
|
||||
|
||||
sk_sp<SkShader> make(sk_sp<SkData> inputs, const SkMatrix* localMatrix);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user