Revert "Don't instantiate shaders with non-invertible local matrix"
This reverts commit ebfbba9bbd
.
Reason for revert: breaks chrome blink tests for linux_trusty_blink_rel
Original change's description:
> Don't instantiate shaders with non-invertible local matrix
>
> Change-Id: If11f7d57cbf45929632d858f91c02d8f5fa9f442
> Reviewed-on: https://skia-review.googlesource.com/7885
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
>
TBR=fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I41c5513523c27dc4bad68008f08369185897b7a2
Reviewed-on: https://skia-review.googlesource.com/7948
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
This commit is contained in:
parent
aa2bd8f726
commit
0e86725ba4
@ -241,17 +241,11 @@ sk_sp<SkShader> SkShader::MakeColorShader(SkColor color) { return sk_make_sp<SkC
|
||||
|
||||
sk_sp<SkShader> SkShader::MakeBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy,
|
||||
const SkMatrix* localMatrix) {
|
||||
if (localMatrix && !localMatrix->invert(nullptr)) {
|
||||
return nullptr;
|
||||
}
|
||||
return SkMakeBitmapShader(src, tmx, tmy, localMatrix, kIfMutable_SkCopyPixelsMode, nullptr);
|
||||
}
|
||||
|
||||
sk_sp<SkShader> SkShader::MakePictureShader(sk_sp<SkPicture> src, TileMode tmx, TileMode tmy,
|
||||
const SkMatrix* localMatrix, const SkRect* tile) {
|
||||
if (localMatrix && !localMatrix->invert(nullptr)) {
|
||||
return nullptr;
|
||||
}
|
||||
return SkPictureShader::Make(std::move(src), tmx, tmy, localMatrix, tile);
|
||||
}
|
||||
|
||||
|
@ -944,9 +944,6 @@ sk_sp<SkShader> SkGradientShader::MakeLinear(const SkPoint pts[2],
|
||||
if (1 == colorCount) {
|
||||
return SkShader::MakeColorShader(colors[0], std::move(colorSpace));
|
||||
}
|
||||
if (localMatrix && !localMatrix->invert(nullptr)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ColorStopOptimizer opt(colors, pos, colorCount, mode);
|
||||
|
||||
@ -983,9 +980,6 @@ sk_sp<SkShader> SkGradientShader::MakeRadial(const SkPoint& center, SkScalar rad
|
||||
if (1 == colorCount) {
|
||||
return SkShader::MakeColorShader(colors[0], std::move(colorSpace));
|
||||
}
|
||||
if (localMatrix && !localMatrix->invert(nullptr)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ColorStopOptimizer opt(colors, pos, colorCount, mode);
|
||||
|
||||
@ -1032,9 +1026,6 @@ sk_sp<SkShader> SkGradientShader::MakeTwoPointConical(const SkPoint& start,
|
||||
return SkShader::MakeEmptyShader();
|
||||
}
|
||||
}
|
||||
if (localMatrix && !localMatrix->invert(nullptr)) {
|
||||
return nullptr;
|
||||
}
|
||||
EXPAND_1_COLOR(colorCount);
|
||||
|
||||
ColorStopOptimizer opt(colors, pos, colorCount, mode);
|
||||
@ -1095,9 +1086,6 @@ sk_sp<SkShader> SkGradientShader::MakeSweep(SkScalar cx, SkScalar cy,
|
||||
if (1 == colorCount) {
|
||||
return SkShader::MakeColorShader(colors[0], std::move(colorSpace));
|
||||
}
|
||||
if (localMatrix && !localMatrix->invert(nullptr)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto mode = SkShader::kClamp_TileMode;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user