aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-03-01 20:10:11 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-01 20:10:15 +0000
commitded47a50143470d1acdafa03e878cc7da5608038 (patch)
tree45eb5ca0de078bd3abe6f56a121d5d76abe6ae96 /tests
parentcaf1ebb95f7fea81d416b81beb4b46c25643c714 (diff)
Revert "Add 1010102 support to Ganesh"
This reverts commit 44b61204d9f5681b9474db017577d56f42a32d66. Reason for revert: TSAN bot crashing Original change's description: > Add 1010102 support to Ganesh > > Adds gl1010102, gles1010102, vk1010102, and mtl1010102 > configs to DM. > > This uses the same saveLayer approach as CPU, switching > to 8888 so that we have enough alpha precision. > > Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb > Reviewed-on: https://skia-review.googlesource.com/110500 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com Change-Id: I782e740763044c1ae78fb219161e37eec7617c74 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/111580 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/GrSurfaceTest.cpp1
-rw-r--r--tests/ImageGeneratorTest.cpp2
-rw-r--r--tests/ProxyTest.cpp5
-rw-r--r--tests/ReadWriteAlphaTest.cpp15
-rw-r--r--tests/SpecialSurfaceTest.cpp15
-rw-r--r--tests/SurfaceTest.cpp14
-rw-r--r--tests/TestConfigParsing.cpp6
7 files changed, 17 insertions, 41 deletions
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index a645f99c3e..eb975852d1 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -92,7 +92,6 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) {
kBGRA_8888_GrPixelConfig,
kSRGBA_8888_GrPixelConfig,
kSBGRA_8888_GrPixelConfig,
- kRGBA_1010102_GrPixelConfig,
kRGBA_float_GrPixelConfig,
kRG_float_GrPixelConfig,
kAlpha_half_GrPixelConfig,
diff --git a/tests/ImageGeneratorTest.cpp b/tests/ImageGeneratorTest.cpp
index 574c8e8728..8a7f0decec 100644
--- a/tests/ImageGeneratorTest.cpp
+++ b/tests/ImageGeneratorTest.cpp
@@ -90,12 +90,10 @@ DEF_TEST(PictureImageGenerator, reporter) {
{ kRGBA_8888_SkColorType, kPremul_SkAlphaType, kRGBA_8888_SkColorType == kN32_SkColorType },
{ kBGRA_8888_SkColorType, kPremul_SkAlphaType, kBGRA_8888_SkColorType == kN32_SkColorType },
{ kRGBA_F16_SkColorType, kPremul_SkAlphaType, true },
- { kRGBA_1010102_SkColorType, kPremul_SkAlphaType, true },
{ kRGBA_8888_SkColorType, kUnpremul_SkAlphaType, false },
{ kBGRA_8888_SkColorType, kUnpremul_SkAlphaType, false },
{ kRGBA_F16_SkColorType, kUnpremul_SkAlphaType, false },
- { kRGBA_1010102_SkColorType, kUnpremul_SkAlphaType, false },
};
auto colorspace = SkColorSpace::MakeSRGB();
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index 6ad8199849..f48e2a090f 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -104,7 +104,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredProxyTest, reporter, ctxInfo) {
for (auto origin : { kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin }) {
for (auto widthHeight : { 100, 128, 1048576 }) {
for (auto config : { kAlpha_8_GrPixelConfig, kRGB_565_GrPixelConfig,
- kRGBA_8888_GrPixelConfig, kRGBA_1010102_GrPixelConfig }) {
+ kRGBA_8888_GrPixelConfig }) {
for (auto fit : { SkBackingFit::kExact, SkBackingFit::kApprox }) {
for (auto budgeted : { SkBudgeted::kYes, SkBudgeted::kNo }) {
for (auto numSamples : {1, 4, 16, 128}) {
@@ -196,8 +196,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
return;
}
for (auto origin : { kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin }) {
- for (auto colorType : { kAlpha_8_SkColorType, kRGBA_8888_SkColorType,
- kRGBA_1010102_SkColorType }) {
+ for (auto colorType : { kAlpha_8_SkColorType, kRGBA_8888_SkColorType }) {
for (auto numSamples : {1, 4}) {
GrPixelConfig config = SkImageInfo2GrPixelConfig(colorType, nullptr, caps);
SkASSERT(kUnknown_GrPixelConfig != config);
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp
index ba1022c689..68a3ee0983 100644
--- a/tests/ReadWriteAlphaTest.cpp
+++ b/tests/ReadWriteAlphaTest.cpp
@@ -25,17 +25,11 @@ static const int X_SIZE = 13;
static const int Y_SIZE = 13;
static void validate_alpha_data(skiatest::Reporter* reporter, int w, int h, const uint8_t* actual,
- size_t actualRowBytes, const uint8_t* expected, SkString extraMsg,
- GrPixelConfig config) {
+ size_t actualRowBytes, const uint8_t* expected, SkString extraMsg) {
for (int y = 0; y < h; ++y) {
for (int x = 0; x < w; ++x) {
uint8_t a = actual[y * actualRowBytes + x];
uint8_t e = expected[y * w + x];
- if (kRGBA_1010102_GrPixelConfig == config) {
- // This config only preserves two bits of alpha
- a >>= 6;
- e >>= 6;
- }
if (e != a) {
ERRORF(reporter,
"Failed alpha readback. Expected: 0x%02x, Got: 0x%02x at (%d,%d), %s",
@@ -105,7 +99,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) {
SkString msg;
msg.printf("rb:%d A8", SkToU32(rowBytes));
validate_alpha_data(reporter, X_SIZE, Y_SIZE, readback.get(), nonZeroRowBytes,
- alphaData, msg, kAlpha_8_GrPixelConfig);
+ alphaData, msg);
// Now try writing to a single channel surface (if we could create one).
if (surf) {
@@ -142,8 +136,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) {
static const GrPixelConfig kRGBAConfigs[] {
kRGBA_8888_GrPixelConfig,
kBGRA_8888_GrPixelConfig,
- kSRGBA_8888_GrPixelConfig,
- kRGBA_1010102_GrPixelConfig,
+ kSRGBA_8888_GrPixelConfig
};
for (int y = 0; y < Y_SIZE; ++y) {
@@ -207,7 +200,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) {
SkString msg;
msg.printf("rt:%d, rb:%d 8888", rt, SkToU32(rowBytes));
validate_alpha_data(reporter, X_SIZE, Y_SIZE, readback.get(), nonZeroRowBytes,
- alphaData, msg, config);
+ alphaData, msg);
}
}
}
diff --git a/tests/SpecialSurfaceTest.cpp b/tests/SpecialSurfaceTest.cpp
index 40de08de85..a336cf669d 100644
--- a/tests/SpecialSurfaceTest.cpp
+++ b/tests/SpecialSurfaceTest.cpp
@@ -80,15 +80,12 @@ DEF_TEST(SpecialSurface_Raster2, reporter) {
#if SK_SUPPORT_GPU
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialSurface_Gpu1, reporter, ctxInfo) {
- for (auto config : { kRGBA_8888_GrPixelConfig, kRGBA_1010102_GrPixelConfig }) {
- if (!ctxInfo.grContext()->caps()->isConfigRenderable(config)) {
- continue;
- }
- sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(ctxInfo.grContext(),
- kSmallerSize, kSmallerSize,
- config, nullptr));
- test_surface(surf, reporter, 0);
- }
+ sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(ctxInfo.grContext(),
+ kSmallerSize, kSmallerSize,
+ kRGBA_8888_GrPixelConfig,
+ nullptr));
+
+ test_surface(surf, reporter, 0);
}
#endif
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 35b72a972e..ab91061094 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -932,7 +932,6 @@ static void test_surface_creation_and_snapshot_with_color_space(
skiatest::Reporter* reporter,
const char* prefix,
bool f16Support,
- bool supports1010102,
std::function<sk_sp<SkSurface>(const SkImageInfo&)> surfaceMaker) {
auto srgbColorSpace = SkColorSpace::MakeSRGB();
@@ -961,7 +960,6 @@ static void test_surface_creation_and_snapshot_with_color_space(
{ kRGBA_F16_SkColorType, oddColorSpace, false, "F16-odd" },
{ kRGB_565_SkColorType, srgbColorSpace, false, "565-srgb" },
{ kAlpha_8_SkColorType, srgbColorSpace, false, "A8-srgb" },
- { kRGBA_1010102_SkColorType, nullptr, true, "1010102-nullptr" },
};
for (auto& testConfig : testConfigs) {
@@ -972,8 +970,7 @@ static void test_surface_creation_and_snapshot_with_color_space(
// For some GPU contexts (eg ANGLE), we don't have f16 support, so we should fail to create
// any surface of that type:
bool shouldWork = testConfig.fShouldWork &&
- (f16Support || kRGBA_F16_SkColorType != testConfig.fColorType) &&
- (supports1010102 || kRGBA_1010102_SkColorType != testConfig.fColorType);
+ (f16Support || kRGBA_F16_SkColorType != testConfig.fColorType);
auto surface(surfaceMaker(info));
REPORTER_ASSERT(reporter, SkToBool(surface) == shouldWork, fullTestName.c_str());
@@ -993,8 +990,7 @@ DEF_TEST(SurfaceCreationWithColorSpace, reporter) {
return SkSurface::MakeRaster(info);
};
- test_surface_creation_and_snapshot_with_color_space(reporter, "raster", true, true,
- surfaceMaker);
+ test_surface_creation_and_snapshot_with_color_space(reporter, "raster", true, surfaceMaker);
}
#if SK_SUPPORT_GPU
@@ -1002,13 +998,11 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceCreationWithColorSpace_Gpu, reporter,
GrContext* context = ctxInfo.grContext();
bool f16Support = context->caps()->isConfigRenderable(kRGBA_half_GrPixelConfig);
- bool supports1010102 = context->caps()->isConfigRenderable(kRGBA_1010102_GrPixelConfig);
auto surfaceMaker = [context](const SkImageInfo& info) {
return SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info);
};
- test_surface_creation_and_snapshot_with_color_space(reporter, "gpu", f16Support,
- supports1010102, surfaceMaker);
+ test_surface_creation_and_snapshot_with_color_space(reporter, "gpu", f16Support, surfaceMaker);
std::vector<GrBackendTexture> backendTextures;
auto wrappedSurfaceMaker = [ context, &backendTextures ](const SkImageInfo& info) {
@@ -1034,7 +1028,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceCreationWithColorSpace_Gpu, reporter,
};
test_surface_creation_and_snapshot_with_color_space(reporter, "wrapped", f16Support,
- supports1010102, wrappedSurfaceMaker);
+ wrappedSurfaceMaker);
context->flush();
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index 6ff1fd830f..ec69235ccc 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -110,8 +110,7 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
"mtl",
"gl4444",
"gl565",
- "gltestthreading",
- "gl1010102",
+ "gltestthreading"
});
SkCommandLineConfigArray configs;
@@ -201,9 +200,6 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getAlphaType() == kOpaque_SkAlphaType);
REPORTER_ASSERT(reporter, configs[36]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()->getTestThreading());
- REPORTER_ASSERT(reporter, configs[37]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getColorType() ==
- kRGBA_1010102_SkColorType);
#endif
}