Revert "SkColorSpaceXformer: Preserve local matrix on shaders"
This reverts commit 5d884b5628
.
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>
This commit is contained in:
parent
5a8da16719
commit
a50a11c17e
@ -71,8 +71,7 @@ SkColor SkColorSpaceXformer::apply(SkColor srgb) {
|
|||||||
sk_sp<SkShader> SkColorSpaceXformer::apply(const SkShader* shader) {
|
sk_sp<SkShader> SkColorSpaceXformer::apply(const SkShader* shader) {
|
||||||
SkColor color;
|
SkColor color;
|
||||||
if (shader->isConstant() && shader->asLuminanceColor(&color)) {
|
if (shader->isConstant() && shader->asLuminanceColor(&color)) {
|
||||||
return SkShader::MakeColorShader(this->apply(color))
|
return SkShader::MakeColorShader(this->apply(color));
|
||||||
->makeWithLocalMatrix(shader->getLocalMatrix());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SkShader::TileMode xy[2];
|
SkShader::TileMode xy[2];
|
||||||
@ -86,8 +85,7 @@ sk_sp<SkShader> SkColorSpaceXformer::apply(const SkShader* shader) {
|
|||||||
auto A = this->apply(compose.fShaderA),
|
auto A = this->apply(compose.fShaderA),
|
||||||
B = this->apply(compose.fShaderB);
|
B = this->apply(compose.fShaderB);
|
||||||
if (A && B) {
|
if (A && B) {
|
||||||
return SkShader::MakeComposeShader(std::move(A), std::move(B), compose.fBlendMode)
|
return SkShader::MakeComposeShader(std::move(A), std::move(B), compose.fBlendMode);
|
||||||
->makeWithLocalMatrix(shader->getLocalMatrix());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,7 +147,7 @@ sk_sp<SkShader> SkColorSpaceXformer::apply(const SkShader* shader) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return sk_ref_sp(const_cast<SkShader*>(shader));
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SkPaint& SkColorSpaceXformer::apply(const SkPaint& src) {
|
const SkPaint& SkColorSpaceXformer::apply(const SkPaint& src) {
|
||||||
|
Loading…
Reference in New Issue
Block a user