aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SurfaceTest.cpp
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/SurfaceTest.cpp
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/SurfaceTest.cpp')
-rw-r--r--tests/SurfaceTest.cpp14
1 files changed, 4 insertions, 10 deletions
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();