aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SpecialImageTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2016-11-15 18:07:26 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-15 18:07:40 +0000
commit57ae6cfe01b811aaead80872ed9e5e1d30f35f81 (patch)
tree12dd094a0ba392e374f906cb62426df5d5213d60 /tests/SpecialImageTest.cpp
parentd6010879c6271b66acd4498e892a24de0ffaf15e (diff)
Revert "Support decoding images to multiple formats, depending on usage"
This reverts commit c73a1ecbed64652b3d7aa8dc6face9a2205ce830. Reason for revert: ANGLE and CommandBuffer failures Original change's description: > Support decoding images to multiple formats, depending on usage > > Our codec generator will now preserve any asked-for color space, and > convert the encoded data to that representation. Cacherator now > allows decoding an image to both legacy (nullptr color space), and > color-correct formats. In color-correct mode, we choose the best > decoded format, based on the original properties, and our backend's > capabilities. Preference is given to the native format, when it's > already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer > linear F16, and fall back to sRGB when that's not an option. > > BUG=skia:5907 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4438 > > Change-Id: I847c243dcfb72d8c0f1f6fc73c09547adea933f0 > Reviewed-on: https://skia-review.googlesource.com/4438 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=mtklein@google.com,bsalomon@google.com,msarett@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1818f937464573d601f64e5a1f1eb43f5a778f4e Reviewed-on: https://skia-review.googlesource.com/4832 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests/SpecialImageTest.cpp')
-rw-r--r--tests/SpecialImageTest.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp
index 8cd874a3c8..62a5da6089 100644
--- a/tests/SpecialImageTest.cpp
+++ b/tests/SpecialImageTest.cpp
@@ -155,20 +155,19 @@ DEF_TEST(SpecialImage_Raster, reporter) {
}
}
-static void test_specialimage_image(skiatest::Reporter* reporter,
- SkDestinationSurfaceColorMode colorMode) {
+DEF_TEST(SpecialImage_Image, reporter) {
SkBitmap bm = create_bm();
sk_sp<SkImage> fullImage(SkImage::MakeFromBitmap(bm));
sk_sp<SkSpecialImage> fullSImage(SkSpecialImage::MakeFromImage(
SkIRect::MakeWH(kFullSize, kFullSize),
- fullImage, colorMode));
+ fullImage));
const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
{
- sk_sp<SkSpecialImage> subSImg1(SkSpecialImage::MakeFromImage(subset, fullImage, colorMode));
+ sk_sp<SkSpecialImage> subSImg1(SkSpecialImage::MakeFromImage(subset, fullImage));
test_image(subSImg1, reporter, nullptr, false, kPad, kFullSize);
}
@@ -178,14 +177,6 @@ static void test_specialimage_image(skiatest::Reporter* reporter,
}
}
-DEF_TEST(SpecialImage_Image_Legacy, reporter) {
- test_specialimage_image(reporter, SkDestinationSurfaceColorMode::kLegacy);
-}
-
-DEF_TEST(SpecialImage_Image_ColorSpaceAware, reporter) {
- test_specialimage_image(reporter, SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware);
-}
-
#if SK_SUPPORT_GPU
static void test_texture_backed(skiatest::Reporter* reporter,