This reverts commit
5d884b562828ceb13ccacb71bc4581d2020e62bb.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> SkColorSpaceXformer: Preserve local matrix on shaders
>
> Also, do not drop unknown shaders.
>
> Fixes cts tests.
>
> b/
37161109
> b/
37237678
>
> Bug: skia:
> Change-Id: I0fd817a4d6461ede0ccdcb8f3cccb255b646b864
> Reviewed-on: https://skia-review.googlesource.com/13246
> Commit-Queue: Matt Sarett <msarett@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>
TBR=mtklein@chromium.org,mtklein@google.com,msarett@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I34e02785ac43a04f8452c458680ea1d6518818a6
Reviewed-on: https://skia-review.googlesource.com/13258
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
sk_sp<SkShader> SkColorSpaceXformer::apply(const SkShader* shader) {
SkColor color;
if (shader->isConstant() && shader->asLuminanceColor(&color)) {
- return SkShader::MakeColorShader(this->apply(color))
- ->makeWithLocalMatrix(shader->getLocalMatrix());
+ return SkShader::MakeColorShader(this->apply(color));
}
SkShader::TileMode xy[2];
auto A = this->apply(compose.fShaderA),
B = this->apply(compose.fShaderB);
if (A && B) {
- return SkShader::MakeComposeShader(std::move(A), std::move(B), compose.fBlendMode)
- ->makeWithLocalMatrix(shader->getLocalMatrix());
+ return SkShader::MakeComposeShader(std::move(A), std::move(B), compose.fBlendMode);
}
}
}
}
- return sk_ref_sp(const_cast<SkShader*>(shader));
+ return nullptr;
}
const SkPaint& SkColorSpaceXformer::apply(const SkPaint& src) {