Remove temporarily_sanitize
Added as part of https://skia-review.googlesource.com/c/skia/+/132261/
As I understand it, this is no longer needed to prevent linear blending.
Change-Id: Ieddf1a86f2d5c6c874217549099a4168d2c44b47
Reviewed-on: https://skia-review.googlesource.com/c/189166
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/tests/AnimatedImageTest.cpp b/tests/AnimatedImageTest.cpp
index fd1438a..5f5dadb 100644
--- a/tests/AnimatedImageTest.cpp
+++ b/tests/AnimatedImageTest.cpp
@@ -97,17 +97,6 @@
return true;
}
-// Temporary hack to avoid linear sRGB 8888 surfaces.
-static SkImageInfo temporarily_sanitize(SkImageInfo info) {
- if (info.colorType() == kRGBA_8888_SkColorType ||
- info.colorType() == kBGRA_8888_SkColorType) {
- if (info.colorSpace() && info.colorSpace()->isSRGB()) {
- info = info.makeColorSpace(nullptr);
- }
- }
- return info;
-}
-
DEF_TEST(AnimatedImage_copyOnWrite, r) {
if (GetResourcePath().isEmpty()) {
return;
@@ -148,7 +137,7 @@
std::vector<sk_sp<SkPicture>> pictures(frameCount);
for (int i = 0; i < frameCount; i++) {
SkBitmap& bm = expected[i];
- bm.allocPixels(temporarily_sanitize(imageInfo));
+ bm.allocPixels(imageInfo);
bm.eraseColor(SK_ColorTRANSPARENT);
SkCanvas canvas(bm);
@@ -168,7 +157,7 @@
for (int i = 0; i < frameCount; i++) {
SkBitmap test;
- test.allocPixels(temporarily_sanitize(imageInfo));
+ test.allocPixels(imageInfo);
test.eraseColor(SK_ColorTRANSPARENT);
SkCanvas canvas(test);
@@ -248,7 +237,7 @@
auto testDraw = [r, &frames, &imageInfo, file](const sk_sp<SkAnimatedImage>& animatedImage,
int expectedFrame) {
SkBitmap test;
- test.allocPixels(temporarily_sanitize(imageInfo));
+ test.allocPixels(imageInfo);
test.eraseColor(0);
SkCanvas c(test);
animatedImage->draw(&c);