aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageGeneratorTest.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-01-19 11:32:06 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-19 17:08:13 +0000
commit59a1df225d1229f7aedd58cab4337892e390574e (patch)
treefc290bd338cd60a16d8b3adfbf71bdb521bfb5b2 /tests/ImageGeneratorTest.cpp
parent440f8382b009c9af12da567119566113a89ec935 (diff)
Delete SkColorSpaceXformImageGenerator and SkImagePriv::SkMakeImageInColorSpace
These don't seem to be used by anyone anymore so lets kill them. Bug: skia: Change-Id: I7908a9c9357e9e3b3166af9a14899dab522c3f11 Reviewed-on: https://skia-review.googlesource.com/97144 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/ImageGeneratorTest.cpp')
-rw-r--r--tests/ImageGeneratorTest.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/ImageGeneratorTest.cpp b/tests/ImageGeneratorTest.cpp
index 5cfd410ad0..7ee0b90c4c 100644
--- a/tests/ImageGeneratorTest.cpp
+++ b/tests/ImageGeneratorTest.cpp
@@ -110,46 +110,3 @@ DEF_TEST(PictureImageGenerator, reporter) {
}
}
-#include "SkImagePriv.h"
-
-DEF_TEST(ColorXformGenerator, r) {
- SkBitmap a, b, c, d, e;
- SkImageInfo info = SkImageInfo::MakeS32(1, 1, kPremul_SkAlphaType);
- a.allocPixels(info);
- b.allocPixels(info.makeColorSpace(nullptr));
- c.allocPixels(info.makeColorSpace(SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
- SkColorSpace::kRec2020_Gamut)));
- d.allocPixels(info.makeColorSpace(SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
- SkColorSpace::kAdobeRGB_Gamut)));
- e.allocPixels(info);
- a.eraseColor(0);
- b.eraseColor(1);
- c.eraseColor(2);
- d.eraseColor(3);
- e.eraseColor(4);
-
- sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB();
- sk_sp<SkImage> ia = SkMakeImageInColorSpace(a, srgb, 0);
- sk_sp<SkImage> ib = SkMakeImageInColorSpace(b, srgb, b.getGenerationID());
- sk_sp<SkImage> ic = SkMakeImageInColorSpace(c, srgb, c.getGenerationID());
- sk_sp<SkImage> id = SkMakeImageInColorSpace(d, srgb, 0);
- sk_sp<SkImage> ie = SkMakeImageInColorSpace(e, srgb, e.getGenerationID(),
- kAlways_SkCopyPixelsMode);
-
- // Equal because sRGB->sRGB is a no-op.
- REPORTER_ASSERT(r, ia->uniqueID() == a.getGenerationID());
-
- // Equal because nullptr->sRGB is a no-op (nullptr is treated as sRGB), and because
- // we pass the explicit id that we want. In the no-op case, the implementation
- // actually asserts that if we pass an id, it must match the id on the bitmap.
- REPORTER_ASSERT(r, ib->uniqueID() == b.getGenerationID());
-
- // Equal because we pass in an explicit id.
- REPORTER_ASSERT(r, ic->uniqueID() == c.getGenerationID());
-
- // Not equal because sRGB->Adobe is not a no-op and we do not pass an explicit id.
- REPORTER_ASSERT(r, id->uniqueID() != d.getGenerationID());
-
- // Equal because we pass in an explicit id. Forcing a copy, but still want the id respected.
- REPORTER_ASSERT(r, ie->uniqueID() == e.getGenerationID());
-}