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:
Matt Sarett 2017-04-12 15:48:35 +00:00 committed by Skia Commit-Bot
parent 5a8da16719
commit a50a11c17e

View File

@ -71,8 +71,7 @@ SkColor SkColorSpaceXformer::apply(SkColor srgb) {
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];
@ -86,8 +85,7 @@ sk_sp<SkShader> SkColorSpaceXformer::apply(const SkShader* shader) {
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);
}
}
@ -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) {