Remove unused quality param for skvm program

No behavior/pixel differences expected.

Change-Id: I9916a74de5063fd81f78bc3744ed32460e12c656
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387236
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2021-03-19 14:05:19 -04:00 committed by Skia Commit-Bot
parent 73318b3583
commit 80468375c0
22 changed files with 51 additions and 80 deletions

View File

@ -189,7 +189,7 @@ public:
skvm::Color result = as_SB(fShader)->program( skvm::Color result = as_SB(fShader)->program(
builder, /*device=*/coord, /*local=*/coord, /*paint=*/{zero, zero, zero, zero}, builder, /*device=*/coord, /*local=*/coord, /*paint=*/{zero, zero, zero, zero},
matrixProvider, /*localM=*/nullptr, kLow_SkFilterQuality, colorInfo, fUniforms, matrixProvider, /*localM=*/nullptr, colorInfo, fUniforms,
fAlloc); fAlloc);
SkASSERT(result); SkASSERT(result);
outResult[0] = result.r; outResult[0] = result.r;

View File

@ -150,8 +150,7 @@ protected:
skvm::Color onProgram(skvm::Builder*, skvm::Color onProgram(skvm::Builder*,
skvm::Coord, skvm::Coord, skvm::Color, skvm::Coord, skvm::Coord, skvm::Color,
const SkMatrixProvider&, const SkMatrix*, const SkMatrixProvider&, const SkMatrix*, const SkColorInfo&,
SkFilterQuality, const SkColorInfo&,
skvm::Uniforms*, SkArenaAlloc*) const override { skvm::Uniforms*, SkArenaAlloc*) const override {
// TODO? // TODO?
return {}; return {};

View File

@ -687,7 +687,7 @@ public:
skvm::Color onProgram(skvm::Builder* p, skvm::Color onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& matrices, const SkMatrix* localM, const SkMatrixProvider& matrices, const SkMatrix* localM,
SkFilterQuality quality, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override {
sk_sp<SkData> inputs = sk_sp<SkData> inputs =
get_xformed_uniforms(fEffect.get(), fUniforms, &matrices, dst.colorSpace()); get_xformed_uniforms(fEffect.get(), fUniforms, &matrices, dst.colorSpace());
@ -705,8 +705,7 @@ public:
if (fChildren[ix]) { if (fChildren[ix]) {
SkOverrideDeviceMatrixProvider mats{matrices, SkMatrix::I()}; SkOverrideDeviceMatrixProvider mats{matrices, SkMatrix::I()};
return as_SB(fChildren[ix])->program(p, device, coord, paint, return as_SB(fChildren[ix])->program(p, device, coord, paint,
mats, nullptr, mats, nullptr, dst,
quality, dst,
uniforms, alloc); uniforms, alloc);
} else { } else {
return paint; return paint;

View File

@ -42,7 +42,6 @@ namespace {
SkBlendMode blendMode; SkBlendMode blendMode;
Coverage coverage; Coverage coverage;
SkColor4f paint; SkColor4f paint;
SkFilterQuality quality;
const SkMatrixProvider& matrices; const SkMatrixProvider& matrices;
Params withCoverage(Coverage c) const { Params withCoverage(Coverage c) const {
@ -144,8 +143,7 @@ namespace {
if (auto c = sb->program(&p, if (auto c = sb->program(&p,
device,/*local=*/device, paint, device,/*local=*/device, paint,
params.matrices, /*localM=*/nullptr, params.matrices, /*localM=*/nullptr,
params.quality, params.dst, params.dst, uniforms,alloc)) {
uniforms,alloc)) {
hash = p.hash(); hash = p.hash();
// p.hash() folds in all instructions to produce r,g,b,a but does not know // p.hash() folds in all instructions to produce r,g,b,a but does not know
// precisely which value we'll treat as which channel. Imagine the shader // precisely which value we'll treat as which channel. Imagine the shader
@ -200,8 +198,7 @@ namespace {
// See note about arguments above: a SpriteShader will call p->arg() once during program(). // See note about arguments above: a SpriteShader will call p->arg() once during program().
skvm::Color src = as_SB(params.shader)->program(p, device,/*local=*/device, paint, skvm::Color src = as_SB(params.shader)->program(p, device,/*local=*/device, paint,
params.matrices, /*localM=*/nullptr, params.matrices, /*localM=*/nullptr,
params.quality, params.dst, params.dst, uniforms, alloc);
uniforms, alloc);
SkASSERT(src); SkASSERT(src);
if (params.coverage == Coverage::Mask3D) { if (params.coverage == Coverage::Mask3D) {
skvm::F32 M = from_unorm(8, p->load8(p->varying<uint8_t>())), skvm::F32 M = from_unorm(8, p->load8(p->varying<uint8_t>())),
@ -271,8 +268,7 @@ namespace {
if (params.clip) { if (params.clip) {
skvm::Color clip = as_SB(params.clip)->program(p, device,/*local=*/device, paint, skvm::Color clip = as_SB(params.clip)->program(p, device,/*local=*/device, paint,
params.matrices, /*localM=*/nullptr, params.matrices, /*localM=*/nullptr,
params.quality, params.dst, params.dst, uniforms, alloc);
uniforms, alloc);
SkAssertResult(clip); SkAssertResult(clip);
cov.r *= clip.a; // We use the alpha channel of clip for all four. cov.r *= clip.a; // We use the alpha channel of clip for all four.
cov.g *= clip.a; cov.g *= clip.a;
@ -353,7 +349,7 @@ namespace {
skvm::Color onProgram(skvm::Builder* p, skvm::Color onProgram(skvm::Builder* p,
skvm::Coord /*device*/, skvm::Coord /*local*/, skvm::Color /*paint*/, skvm::Coord /*device*/, skvm::Coord /*local*/, skvm::Color /*paint*/,
const SkMatrixProvider&, const SkMatrix* /*localM*/, const SkMatrixProvider&, const SkMatrix* /*localM*/,
SkFilterQuality, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc*) const override { skvm::Uniforms* uniforms, SkArenaAlloc*) const override {
const SkColorType ct = fSprite.colorType(); const SkColorType ct = fSprite.colorType();
@ -379,11 +375,11 @@ namespace {
skvm::Color onProgram(skvm::Builder* p, skvm::Color onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& matrices, const SkMatrix* localM, const SkMatrixProvider& matrices, const SkMatrix* localM,
SkFilterQuality quality, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override {
// Run our wrapped shader. // Run our wrapped shader.
skvm::Color c = as_SB(fShader)->program(p, device,local, paint, skvm::Color c = as_SB(fShader)->program(p, device,local, paint,
matrices,localM, quality,dst, uniforms,alloc); matrices,localM, dst, uniforms,alloc);
if (!c) { if (!c) {
return {}; return {};
} }
@ -465,8 +461,7 @@ namespace {
skvm::Color onProgram(skvm::Builder*, skvm::Color onProgram(skvm::Builder*,
skvm::Coord, skvm::Coord, skvm::Color paint, skvm::Coord, skvm::Coord, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix*, const SkMatrixProvider&, const SkMatrix*, const SkColorInfo&,
SkFilterQuality, const SkColorInfo&,
skvm::Uniforms*, SkArenaAlloc*) const override { skvm::Uniforms*, SkArenaAlloc*) const override {
// Incoming `paint` is unpremul in the destination color space, // Incoming `paint` is unpremul in the destination color space,
// so we just need to premul it. // so we just need to premul it.
@ -537,7 +532,6 @@ namespace {
blendMode, blendMode,
Coverage::Full, // Placeholder... withCoverage() will change as needed. Coverage::Full, // Placeholder... withCoverage() will change as needed.
paintColor, paintColor,
paint.getFilterQuality(),
matrices, matrices,
}; };
} }

View File

@ -65,12 +65,11 @@ bool SkColorFilterShader::onAppendStages(const SkStageRec& rec) const {
skvm::Color SkColorFilterShader::onProgram(skvm::Builder* p, skvm::Color SkColorFilterShader::onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& matrices, const SkMatrix* localM, const SkMatrixProvider& matrices, const SkMatrix* localM,
SkFilterQuality quality, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const {
// Run the shader. // Run the shader.
skvm::Color c = as_SB(fShader)->program(p, device,local, paint, skvm::Color c = as_SB(fShader)->program(p, device,local, paint,
matrices,localM, matrices,localM, dst,
quality,dst,
uniforms,alloc); uniforms,alloc);
if (!c) { if (!c) {
return {}; return {};

View File

@ -27,8 +27,7 @@ private:
bool onAppendStages(const SkStageRec&) const override; bool onAppendStages(const SkStageRec&) const override;
skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dst,
SkFilterQuality quality, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc*) const override; skvm::Uniforms* uniforms, SkArenaAlloc*) const override;
SK_FLATTENABLE_HOOKS(SkColorFilterShader) SK_FLATTENABLE_HOOKS(SkColorFilterShader)

View File

@ -93,9 +93,8 @@ bool SkColor4Shader::onAppendStages(const SkStageRec& rec) const {
skvm::Color SkColorShader::onProgram(skvm::Builder* p, skvm::Color SkColorShader::onProgram(skvm::Builder* p,
skvm::Coord /*device*/, skvm::Coord /*local*/, skvm::Coord /*device*/, skvm::Coord /*local*/,
skvm::Color /*paint*/, skvm::Color /*paint*/, const SkMatrixProvider&,
const SkMatrixProvider&, const SkMatrix* /*localM*/, const SkMatrix* /*localM*/, const SkColorInfo& dst,
SkFilterQuality /*quality*/, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc*) const { skvm::Uniforms* uniforms, SkArenaAlloc*) const {
SkColor4f color = SkColor4f::FromColor(fColor); SkColor4f color = SkColor4f::FromColor(fColor);
SkColorSpaceXformSteps(sk_srgb_singleton(), kUnpremul_SkAlphaType, SkColorSpaceXformSteps(sk_srgb_singleton(), kUnpremul_SkAlphaType,
@ -104,9 +103,8 @@ skvm::Color SkColorShader::onProgram(skvm::Builder* p,
} }
skvm::Color SkColor4Shader::onProgram(skvm::Builder* p, skvm::Color SkColor4Shader::onProgram(skvm::Builder* p,
skvm::Coord /*device*/, skvm::Coord /*local*/, skvm::Coord /*device*/, skvm::Coord /*local*/,
skvm::Color /*paint*/, skvm::Color /*paint*/, const SkMatrixProvider&,
const SkMatrixProvider&, const SkMatrix* /*localM*/, const SkMatrix* /*localM*/, const SkColorInfo& dst,
SkFilterQuality /*quality*/, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc*) const { skvm::Uniforms* uniforms, SkArenaAlloc*) const {
SkColor4f color = fColor; SkColor4f color = fColor;
SkColorSpaceXformSteps(fColorSpace.get(), kUnpremul_SkAlphaType, SkColorSpaceXformSteps(fColorSpace.get(), kUnpremul_SkAlphaType,

View File

@ -45,8 +45,7 @@ private:
bool onAppendStages(const SkStageRec&) const override; bool onAppendStages(const SkStageRec&) const override;
skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dst,
SkFilterQuality quality, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc*) const override; skvm::Uniforms* uniforms, SkArenaAlloc*) const override;
SkColor fColor; SkColor fColor;
@ -70,8 +69,7 @@ private:
bool onAppendStages(const SkStageRec&) const override; bool onAppendStages(const SkStageRec&) const override;
skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dst,
SkFilterQuality quality, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc*) const override; skvm::Uniforms* uniforms, SkArenaAlloc*) const override;
sk_sp<SkColorSpace> fColorSpace; sk_sp<SkColorSpace> fColorSpace;

View File

@ -130,20 +130,20 @@ bool SkShader_Blend::onAppendStages(const SkStageRec& orig_rec) const {
static skvm::Color program_or_paint(const sk_sp<SkShader>& sh, skvm::Builder* p, static skvm::Color program_or_paint(const sk_sp<SkShader>& sh, skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& mats, const SkMatrix* localM, const SkMatrixProvider& mats, const SkMatrix* localM,
SkFilterQuality q, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) {
return sh ? as_SB(sh)->program(p, device,local, paint, mats,localM, q,dst, uniforms,alloc) return sh ? as_SB(sh)->program(p, device,local, paint, mats,localM, dst, uniforms,alloc)
: p->premul(paint); : p->premul(paint);
} }
skvm::Color SkShader_Blend::onProgram(skvm::Builder* p, skvm::Color SkShader_Blend::onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& mats, const SkMatrix* localM, const SkMatrixProvider& mats, const SkMatrix* localM,
SkFilterQuality q, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const {
skvm::Color d,s; skvm::Color d,s;
if ((d = program_or_paint(fDst, p, device,local, paint, mats,localM, q,dst, uniforms,alloc)) && if ((d = program_or_paint(fDst, p, device,local, paint, mats,localM, dst, uniforms,alloc)) &&
(s = program_or_paint(fSrc, p, device,local, paint, mats,localM, q,dst, uniforms,alloc))) (s = program_or_paint(fSrc, p, device,local, paint, mats,localM, dst, uniforms,alloc)))
{ {
return p->blend(fMode, s,d); return p->blend(fMode, s,d);
} }
@ -180,11 +180,11 @@ bool SkShader_Lerp::onAppendStages(const SkStageRec& orig_rec) const {
skvm::Color SkShader_Lerp::onProgram(skvm::Builder* p, skvm::Color SkShader_Lerp::onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& mats, const SkMatrix* localM, const SkMatrixProvider& mats, const SkMatrix* localM,
SkFilterQuality q, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const {
skvm::Color d,s; skvm::Color d,s;
if ((d = program_or_paint(fDst, p, device,local, paint, mats,localM, q,dst, uniforms,alloc)) && if ((d = program_or_paint(fDst, p, device,local, paint, mats,localM, dst, uniforms,alloc)) &&
(s = program_or_paint(fSrc, p, device,local, paint, mats,localM, q,dst, uniforms,alloc))) (s = program_or_paint(fSrc, p, device,local, paint, mats,localM, dst, uniforms,alloc)))
{ {
auto t = p->uniformF(uniforms->pushF(fWeight)); auto t = p->uniformF(uniforms->pushF(fWeight));
return { return {

View File

@ -28,8 +28,7 @@ protected:
void flatten(SkWriteBuffer&) const override; void flatten(SkWriteBuffer&) const override;
bool onAppendStages(const SkStageRec&) const override; bool onAppendStages(const SkStageRec&) const override;
skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dst,
SkFilterQuality, const SkColorInfo& dst,
skvm::Uniforms*, SkArenaAlloc*) const override; skvm::Uniforms*, SkArenaAlloc*) const override;
private: private:
@ -61,8 +60,7 @@ protected:
void flatten(SkWriteBuffer&) const override; void flatten(SkWriteBuffer&) const override;
bool onAppendStages(const SkStageRec&) const override; bool onAppendStages(const SkStageRec&) const override;
skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dst,
SkFilterQuality, const SkColorInfo& dst,
skvm::Uniforms*, SkArenaAlloc*) const override; skvm::Uniforms*, SkArenaAlloc*) const override;
private: private:

View File

@ -38,8 +38,7 @@ protected:
} }
skvm::Color onProgram(skvm::Builder*, skvm::Coord, skvm::Coord, skvm::Color, skvm::Color onProgram(skvm::Builder*, skvm::Coord, skvm::Coord, skvm::Color,
const SkMatrixProvider&, const SkMatrix*, const SkMatrixProvider&, const SkMatrix*, const SkColorInfo&,
SkFilterQuality, const SkColorInfo&,
skvm::Uniforms*, SkArenaAlloc*) const override; skvm::Uniforms*, SkArenaAlloc*) const override;
private: private:

View File

@ -811,7 +811,7 @@ SkStageUpdater* SkImageShader::onAppendUpdatableStages(const SkStageRec& rec) co
skvm::Color SkImageShader::onProgram(skvm::Builder* p, skvm::Color SkImageShader::onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord origLocal, skvm::Color paint, skvm::Coord device, skvm::Coord origLocal, skvm::Color paint,
const SkMatrixProvider& matrices, const SkMatrix* localM, const SkMatrixProvider& matrices, const SkMatrix* localM,
SkFilterQuality, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const {
SkMatrix baseInv; SkMatrix baseInv;
if (!this->computeTotalInverse(matrices.localToDevice(), localM, &baseInv)) { if (!this->computeTotalInverse(matrices.localToDevice(), localM, &baseInv)) {

View File

@ -52,8 +52,7 @@ private:
SkStageUpdater* onAppendUpdatableStages(const SkStageRec&) const override; SkStageUpdater* onAppendUpdatableStages(const SkStageRec&) const override;
skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dst,
SkFilterQuality quality, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc*) const override; skvm::Uniforms* uniforms, SkArenaAlloc*) const override;
bool doStages(const SkStageRec&, SkImageStageUpdater* = nullptr) const; bool doStages(const SkStageRec&, SkImageStageUpdater* = nullptr) const;

View File

@ -81,15 +81,14 @@ bool SkLocalMatrixShader::onAppendStages(const SkStageRec& rec) const {
skvm::Color SkLocalMatrixShader::onProgram(skvm::Builder* p, skvm::Color SkLocalMatrixShader::onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& matrices, const SkMatrix* localM, const SkMatrixProvider& matrices, const SkMatrix* localM,
SkFilterQuality quality, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const {
SkTCopyOnFirstWrite<SkMatrix> lm(this->getLocalMatrix()); SkTCopyOnFirstWrite<SkMatrix> lm(this->getLocalMatrix());
if (localM) { if (localM) {
lm.writable()->preConcat(*localM); lm.writable()->preConcat(*localM);
} }
return as_SB(fProxyShader)->program(p, device,local, paint, return as_SB(fProxyShader)->program(p, device,local, paint,
matrices,lm.get(), matrices,lm.get(), dst,
quality,dst,
uniforms,alloc); uniforms,alloc);
} }
@ -160,12 +159,11 @@ protected:
skvm::Color onProgram(skvm::Builder* p, skvm::Color onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& matrices, const SkMatrix* localM, const SkMatrixProvider& matrices, const SkMatrix* localM,
SkFilterQuality quality, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override {
SkOverrideDeviceMatrixProvider matrixProvider(matrices, fCTM); SkOverrideDeviceMatrixProvider matrixProvider(matrices, fCTM);
return as_SB(fProxyShader)->program(p, device,local, paint, return as_SB(fProxyShader)->program(p, device,local, paint,
matrixProvider,localM, matrixProvider,localM, dst,
quality,dst,
uniforms,alloc); uniforms,alloc);
} }

View File

@ -49,8 +49,7 @@ protected:
bool onAppendStages(const SkStageRec&) const override; bool onAppendStages(const SkStageRec&) const override;
skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dst,
SkFilterQuality quality, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc*) const override; skvm::Uniforms* uniforms, SkArenaAlloc*) const override;
private: private:

View File

@ -304,8 +304,7 @@ public:
skvm::Color onProgram(skvm::Builder*, skvm::Color onProgram(skvm::Builder*,
skvm::Coord, skvm::Coord, skvm::Color, skvm::Coord, skvm::Coord, skvm::Color,
const SkMatrixProvider&, const SkMatrix*, const SkMatrixProvider&, const SkMatrix*, const SkColorInfo&,
SkFilterQuality, const SkColorInfo&,
skvm::Uniforms*, SkArenaAlloc*) const override { skvm::Uniforms*, SkArenaAlloc*) const override {
// TODO? // TODO?
return {}; return {};

View File

@ -296,7 +296,7 @@ bool SkPictureShader::onAppendStages(const SkStageRec& rec) const {
skvm::Color SkPictureShader::onProgram(skvm::Builder* p, skvm::Color SkPictureShader::onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& matrices, const SkMatrix* localM, const SkMatrixProvider& matrices, const SkMatrix* localM,
SkFilterQuality quality, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const {
auto lm = this->totalLocalMatrix(localM); auto lm = this->totalLocalMatrix(localM);
@ -309,8 +309,7 @@ skvm::Color SkPictureShader::onProgram(skvm::Builder* p,
} }
return as_SB(bitmapShader)->program(p, device,local, paint, return as_SB(bitmapShader)->program(p, device,local, paint,
matrices,lm, matrices,lm, dst,
quality,dst,
uniforms,alloc); uniforms,alloc);
} }

View File

@ -36,8 +36,7 @@ protected:
void flatten(SkWriteBuffer&) const override; void flatten(SkWriteBuffer&) const override;
bool onAppendStages(const SkStageRec&) const override; bool onAppendStages(const SkStageRec&) const override;
skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dst,
SkFilterQuality quality, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override; skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override;
#ifdef SK_ENABLE_LEGACY_SHADERCONTEXT #ifdef SK_ENABLE_LEGACY_SHADERCONTEXT

View File

@ -198,7 +198,7 @@ bool SkShaderBase::onAppendStages(const SkStageRec& rec) const {
skvm::Color SkShaderBase::program(skvm::Builder* p, skvm::Color SkShaderBase::program(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider& matrices, const SkMatrix* localM, const SkMatrixProvider& matrices, const SkMatrix* localM,
SkFilterQuality quality, const SkColorInfo& dst, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const {
// Shader subclasses should always act as if the destination were premul or opaque. // Shader subclasses should always act as if the destination were premul or opaque.
// SkVMBlitter handles all the coordination of unpremul itself, via premul. // SkVMBlitter handles all the coordination of unpremul itself, via premul.
@ -218,7 +218,7 @@ skvm::Color SkShaderBase::program(skvm::Builder* p,
// shader program hash and blitter Key. This makes it safe for us to use // shader program hash and blitter Key. This makes it safe for us to use
// that bit to make decisions when constructing an SkVMBlitter, like doing // that bit to make decisions when constructing an SkVMBlitter, like doing
// SrcOver -> Src strength reduction. // SrcOver -> Src strength reduction.
if (auto color = this->onProgram(p, device,local, paint, matrices,localM, quality,tweaked, if (auto color = this->onProgram(p, device,local, paint, matrices,localM, tweaked,
uniforms,alloc)) { uniforms,alloc)) {
if (this->isOpaque()) { if (this->isOpaque()) {
color.a = p->splat(1.0f); color.a = p->splat(1.0f);
@ -265,8 +265,7 @@ skvm::Coord SkShaderBase::ApplyMatrix(skvm::Builder* p, const SkMatrix& m,
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
skvm::Color SkEmptyShader::onProgram(skvm::Builder*, skvm::Coord, skvm::Coord, skvm::Color, skvm::Color SkEmptyShader::onProgram(skvm::Builder*, skvm::Coord, skvm::Coord, skvm::Color,
const SkMatrixProvider&, const SkMatrix*, const SkMatrixProvider&, const SkMatrix*, const SkColorInfo&,
SkFilterQuality, const SkColorInfo&,
skvm::Uniforms*, SkArenaAlloc*) const { skvm::Uniforms*, SkArenaAlloc*) const {
return {}; // signal failure return {}; // signal failure
} }

View File

@ -8,7 +8,6 @@
#ifndef SkShaderBase_DEFINED #ifndef SkShaderBase_DEFINED
#define SkShaderBase_DEFINED #define SkShaderBase_DEFINED
#include "include/core/SkFilterQuality.h"
#include "include/core/SkMatrix.h" #include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h" #include "include/core/SkPaint.h"
#include "include/core/SkSamplingOptions.h" #include "include/core/SkSamplingOptions.h"
@ -218,8 +217,7 @@ public:
SK_WARN_UNUSED_RESULT SK_WARN_UNUSED_RESULT
skvm::Color program(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color program(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dst,
SkFilterQuality quality, const SkColorInfo& dst,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const; skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const;
protected: protected:
@ -256,8 +254,7 @@ private:
virtual skvm::Color onProgram(skvm::Builder*, virtual skvm::Color onProgram(skvm::Builder*,
skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM,
SkFilterQuality quality, const SkColorInfo& dst, const SkColorInfo& dst, skvm::Uniforms*, SkArenaAlloc*) const = 0;
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const = 0;
using INHERITED = SkShader; using INHERITED = SkShader;
}; };

View File

@ -424,7 +424,7 @@ skvm::Color SkGradientShaderBase::onProgram(skvm::Builder* p,
skvm::Coord device, skvm::Coord local, skvm::Coord device, skvm::Coord local,
skvm::Color /*paint*/, skvm::Color /*paint*/,
const SkMatrixProvider& mats, const SkMatrix* localM, const SkMatrixProvider& mats, const SkMatrix* localM,
SkFilterQuality quality, const SkColorInfo& dstInfo, const SkColorInfo& dstInfo,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const {
SkMatrix inv; SkMatrix inv;
if (!this->computeTotalInverse(mats.localToDevice(), localM, &inv)) { if (!this->computeTotalInverse(mats.localToDevice(), localM, &inv)) {

View File

@ -80,8 +80,7 @@ protected:
bool onAppendStages(const SkStageRec&) const override; bool onAppendStages(const SkStageRec&) const override;
skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint,
const SkMatrixProvider&, const SkMatrix* localM, const SkMatrixProvider&, const SkMatrix* localM, const SkColorInfo& dstCS,
SkFilterQuality quality, const SkColorInfo& dstCS,
skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override; skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override;
virtual void appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* tPipeline, virtual void appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* tPipeline,