diff options
author | bsalomon <bsalomon@google.com> | 2016-04-12 09:59:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-12 09:59:58 -0700 |
commit | 68d9134bec16e91c4a6cde071bcaa579bc0801a7 (patch) | |
tree | f456a106500881514ceefca0ce67aedb625d1d2f /tests | |
parent | 71e185c060491c8b7b270a211590931715122786 (diff) |
Make more unit tests run on Vulkan
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885623002
Review URL: https://codereview.chromium.org/1885623002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/BitmapCopyTest.cpp | 2 | ||||
-rw-r--r-- | tests/ClearTest.cpp | 2 | ||||
-rw-r--r-- | tests/ClipBoundsTest.cpp | 2 | ||||
-rw-r--r-- | tests/CopySurfaceTest.cpp | 2 | ||||
-rw-r--r-- | tests/FloatingPointTextureTest.cpp | 6 | ||||
-rw-r--r-- | tests/GpuLayerCacheTest.cpp | 2 | ||||
-rw-r--r-- | tests/ImageFilterCacheTest.cpp | 2 | ||||
-rw-r--r-- | tests/ImageFilterTest.cpp | 16 | ||||
-rw-r--r-- | tests/ImageNewShaderTest.cpp | 2 | ||||
-rw-r--r-- | tests/ImageTest.cpp | 6 | ||||
-rw-r--r-- | tests/PremulAlphaRoundTripTest.cpp | 2 | ||||
-rw-r--r-- | tests/RecordReplaceDrawTest.cpp | 2 | ||||
-rw-r--r-- | tests/ResourceCacheTest.cpp | 6 | ||||
-rw-r--r-- | tests/SpecialImageTest.cpp | 4 | ||||
-rw-r--r-- | tests/SurfaceTest.cpp | 6 | ||||
-rw-r--r-- | tests/Test.h | 3 | ||||
-rw-r--r-- | tests/TestTest.cpp | 2 |
17 files changed, 35 insertions, 32 deletions
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp index 9ae9ab7a78..fb38c7e46f 100644 --- a/tests/BitmapCopyTest.cpp +++ b/tests/BitmapCopyTest.cpp @@ -639,7 +639,7 @@ DEF_TEST(BitmapReadPixels, reporter) { #include "SkColorPriv.h" /** Tests calling copyTo on a texture backed bitmap. Tests that all BGRA_8888/RGBA_8888 combinations of src and dst work. This test should be removed when SkGrPixelRef is removed. */ -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(BitmapCopy_Texture, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(BitmapCopy_Texture, reporter, ctxInfo) { static const SkPMColor kData[] = { 0xFF112233, 0xAF224499, 0xEF004466, 0x80773311 diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp index 160ebb3c76..56f2fe17be 100644 --- a/tests/ClearTest.cpp +++ b/tests/ClearTest.cpp @@ -65,7 +65,7 @@ static bool reset_dc(SkAutoTUnref<GrDrawContext>* dc, SkAutoTUnref<GrSurface>* r return *dc != nullptr; } -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ClearBatch, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ClearBatch, reporter, ctxInfo) { GrContext* context = ctxInfo.fGrContext; static const int kW = 10; static const int kH = 10; diff --git a/tests/ClipBoundsTest.cpp b/tests/ClipBoundsTest.cpp index 25f6f5c068..abdd3f44fa 100644 --- a/tests/ClipBoundsTest.cpp +++ b/tests/ClipBoundsTest.cpp @@ -13,7 +13,7 @@ // Ensure that the 'getConservativeBounds' calls are returning bounds clamped // to the render target -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(GrClipBounds, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrClipBounds, reporter, ctxInfo) { static const int kXSize = 100; static const int kYSize = 100; diff --git a/tests/CopySurfaceTest.cpp b/tests/CopySurfaceTest.cpp index d3ecb7d0ca..af58bf9e5c 100644 --- a/tests/CopySurfaceTest.cpp +++ b/tests/CopySurfaceTest.cpp @@ -15,7 +15,7 @@ #include "SkUtils.h" -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(CopySurface, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(CopySurface, reporter, ctxInfo) { GrContext* context = ctxInfo.fGrContext; static const int kW = 10; static const int kH = 10; diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp index 564b09466a..0880ef67bb 100644 --- a/tests/FloatingPointTextureTest.cpp +++ b/tests/FloatingPointTextureTest.cpp @@ -60,7 +60,7 @@ void runFPTest(skiatest::Reporter* reporter, GrContext* context, static const int FP_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4/*RGBA*/; static const float kMaxIntegerRepresentableInSPFloatingPoint = 16777216; // 2 ^ 24 -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(FloatingPointTextureTest, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(FloatingPointTextureTest, reporter, ctxInfo) { runFPTest<float>(reporter, ctxInfo.fGrContext, FLT_MIN, FLT_MAX, FLT_EPSILON, kMaxIntegerRepresentableInSPFloatingPoint, FP_CONTROL_ARRAY_SIZE, kRGBA_float_GrPixelConfig); @@ -69,7 +69,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(FloatingPointTextureTest, reporter, ctxInf static const int HALF_ALPHA_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 1 /*alpha-only*/; static const SkHalf kMaxIntegerRepresentableInHalfFloatingPoint = 0x6800; // 2 ^ 11 -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(HalfFloatAlphaTextureTest, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(HalfFloatAlphaTextureTest, reporter, ctxInfo) { runFPTest<SkHalf>(reporter, ctxInfo.fGrContext, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon, kMaxIntegerRepresentableInHalfFloatingPoint, HALF_ALPHA_CONTROL_ARRAY_SIZE, kAlpha_half_GrPixelConfig); @@ -77,7 +77,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(HalfFloatAlphaTextureTest, reporter, ctxIn static const int HALF_RGBA_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4 /*RGBA*/; -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(HalfFloatRGBATextureTest, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(HalfFloatRGBATextureTest, reporter, ctxInfo) { runFPTest<SkHalf>(reporter, ctxInfo.fGrContext, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon, kMaxIntegerRepresentableInHalfFloatingPoint, HALF_RGBA_CONTROL_ARRAY_SIZE, kRGBA_half_GrPixelConfig); diff --git a/tests/GpuLayerCacheTest.cpp b/tests/GpuLayerCacheTest.cpp index cdfa75d036..2249eba904 100644 --- a/tests/GpuLayerCacheTest.cpp +++ b/tests/GpuLayerCacheTest.cpp @@ -107,7 +107,7 @@ static void lock_layer(skiatest::Reporter* reporter, // In particular it checks its interaction with the resource cache (w.r.t. // locking & unlocking textures). // TODO: need to add checks on VRAM usage! -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(GpuLayerCache, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GpuLayerCache, reporter, ctxInfo) { // Add one more layer than can fit in the atlas static const int kInitialNumLayers = TestingAccess::NumPlots() + 1; diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp index 579042fbe9..1337d016b7 100644 --- a/tests/ImageFilterCacheTest.cpp +++ b/tests/ImageFilterCacheTest.cpp @@ -208,7 +208,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, test_image_backed(reporter, srcImage); } -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterCache_GPUBacked, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_GPUBacked, reporter, ctxInfo) { SkAutoTUnref<GrTexture> srcTexture(create_texture(ctxInfo.fGrContext)); if (!srcTexture) { diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index a89cd4f609..a6ff0875b7 100644 --- a/tests/ImageFilterTest.cpp +++ b/tests/ImageFilterTest.cpp @@ -666,7 +666,7 @@ DEF_TEST(ImageFilterNegativeBlurSigma, reporter) { } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterNegativeBlurSigma_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterNegativeBlurSigma_Gpu, reporter, ctxInfo) { run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_negative_blur_sigma); } #endif @@ -712,7 +712,7 @@ DEF_TEST(ImageFilterZeroBlurSigma, reporter) { } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterZeroBlurSigma_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterZeroBlurSigma_Gpu, reporter, ctxInfo) { run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_zero_blur_sigma); } #endif @@ -746,7 +746,7 @@ DEF_TEST(ImageFilterFailAffectsTransparentBlack, reporter) { } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterFailAffectsTransparentBlack_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterFailAffectsTransparentBlack_Gpu, reporter, ctxInfo) { run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_fail_affects_transparent_black); } #endif @@ -1098,7 +1098,7 @@ DEF_TEST(ImageFilterCropRect, reporter) { } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterCropRect_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCropRect_Gpu, reporter, ctxInfo) { run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_crop_rects); } #endif @@ -1221,7 +1221,7 @@ DEF_TEST(ImageFilterClippedPictureImageFilter, reporter) { } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterClippedPictureImageFilter_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterClippedPictureImageFilter_Gpu, reporter, ctxInfo) { run_gpu_test(reporter, ctxInfo.fGrContext, 2, test_clipped_picture_imagefilter); } #endif @@ -1480,7 +1480,7 @@ DEF_TEST(ComposedImageFilterOffset, reporter) { } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ComposedImageFilterOffset_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ComposedImageFilterOffset_Gpu, reporter, ctxInfo) { run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_composed_imagefilter_offset); } #endif @@ -1554,7 +1554,7 @@ DEF_TEST(ImageFilterPartialCropRect, reporter) { } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterPartialCropRect_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterPartialCropRect_Gpu, reporter, ctxInfo) { run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_partial_crop_rect); } #endif @@ -1695,7 +1695,7 @@ DEF_TEST(ImageFilterBlurLargeImage, reporter) { #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterHugeBlur_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterHugeBlur_Gpu, reporter, ctxInfo) { const SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType); sk_sp<SkGpuDevice> device(SkGpuDevice::Create(ctxInfo.fGrContext, diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp index adddf41dbf..164f11898e 100644 --- a/tests/ImageNewShaderTest.cpp +++ b/tests/ImageNewShaderTest.cpp @@ -139,7 +139,7 @@ void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) { runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info); } -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageNewShader_GPU, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageNewShader_GPU, reporter, ctxInfo) { // GPU -> GPU gpuToGpu(reporter, ctxInfo.fGrContext); diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp index 793f971643..33575d53dd 100644 --- a/tests/ImageTest.cpp +++ b/tests/ImageTest.cpp @@ -176,7 +176,7 @@ DEF_TEST(ImageEncode, reporter) { } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageEncode_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageEncode_Gpu, reporter, ctxInfo) { test_encode(reporter, create_gpu_image(ctxInfo.fGrContext).get()); } #endif @@ -369,7 +369,7 @@ DEF_TEST(image_newfrombitmap, reporter) { * but we don't have that facility (at the moment) so we use a little internal knowledge * of *how* the raster version is cached, and look for that. */ -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkImage_Gpu2Cpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(c, reporter, ctxInfo) { SkImageInfo info = SkImageInfo::MakeN32(20, 20, kOpaque_SkAlphaType); sk_sp<SkImage> image(create_gpu_image(ctxInfo.fGrContext)); const uint32_t uniqueID = image->uniqueID(); @@ -640,7 +640,7 @@ DEF_TEST(ImageLegacyBitmap, reporter) { } } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageLegacyBitmap_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageLegacyBitmap_Gpu, reporter, ctxInfo) { const SkImage::LegacyBitmapMode modes[] = { SkImage::kRO_LegacyBitmapMode, SkImage::kRW_LegacyBitmapMode, diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp index 457cacc2a0..26badb66c4 100644 --- a/tests/PremulAlphaRoundTripTest.cpp +++ b/tests/PremulAlphaRoundTripTest.cpp @@ -105,7 +105,7 @@ DEF_TEST(PremulAlphaRoundTrip, reporter) { test_premul_alpha_roundtrip(reporter, device); } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(PremulAlphaRoundTrip_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(PremulAlphaRoundTrip_Gpu, reporter, ctxInfo) { const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256); SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType); SkAutoTUnref<SkBaseDevice> device( diff --git a/tests/RecordReplaceDrawTest.cpp b/tests/RecordReplaceDrawTest.cpp index f74bb95002..5506551d6b 100644 --- a/tests/RecordReplaceDrawTest.cpp +++ b/tests/RecordReplaceDrawTest.cpp @@ -141,7 +141,7 @@ void test_replacements(skiatest::Reporter* r, GrContext* context, bool doReplace } } -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(RecordReplaceDraw, r, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(RecordReplaceDraw, r, ctxInfo) { test_replacements(r, ctxInfo.fGrContext, true); test_replacements(r, ctxInfo.fGrContext, false); } diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index a140b94cfd..0ac64edd07 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -30,7 +30,7 @@ static const int gWidth = 640; static const int gHeight = 480; //////////////////////////////////////////////////////////////////////////////// -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ResourceCacheCache, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheCache, reporter, ctxInfo) { GrContext* context = ctxInfo.fGrContext; GrSurfaceDesc desc; desc.fConfig = kSkia8888_GrPixelConfig; @@ -80,7 +80,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ResourceCacheCache, reporter, ctxInfo) { context->setResourceCacheLimits(oldMaxNum, oldMaxBytes); } -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ResourceCacheStencilBuffers, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheStencilBuffers, reporter, ctxInfo) { GrContext* context = ctxInfo.fGrContext; GrSurfaceDesc smallDesc; smallDesc.fFlags = kRenderTarget_GrSurfaceFlag; @@ -188,7 +188,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ResourceCacheStencilBuffers, reporter, ctx } } -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ResourceCacheWrappedResources, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheWrappedResources, reporter, ctxInfo) { GrContext* context = ctxInfo.fGrContext; GrGpu* gpu = context->getGpu(); // this test is only valid for GL diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp index 2818ce9ec7..a8a79668a7 100644 --- a/tests/SpecialImageTest.cpp +++ b/tests/SpecialImageTest.cpp @@ -213,7 +213,7 @@ static void test_texture_backed(skiatest::Reporter* reporter, } // Test out the SkSpecialImage::makeTextureImage entry point -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SpecialImage_MakeTexture, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_MakeTexture, reporter, ctxInfo) { GrContext* context = ctxInfo.fGrContext; SkBitmap bm = create_bm(); @@ -277,7 +277,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SpecialImage_MakeTexture, reporter, ctxInf } } -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SpecialImage_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_Gpu, reporter, ctxInfo) { GrContext* context = ctxInfo.fGrContext; SkBitmap bm = create_bm(); diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index 5528f1a170..ba66a2b3bb 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -300,7 +300,7 @@ DEF_TEST(SurfaceBackendHandleAccessCopyOnWrite, reporter) { } } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SurfaceBackendHandleAccessCopyOnWrite_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceBackendHandleAccessCopyOnWrite_Gpu, reporter, ctxInfo) { const SkSurface::BackendHandleAccess accessModes[] = { SkSurface::kFlushRead_BackendHandleAccess, SkSurface::kFlushWrite_BackendHandleAccess, @@ -398,7 +398,7 @@ DEF_TEST(UniqueImageSnapshot, reporter) { } #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(UniqueImageSnapshot_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(UniqueImageSnapshot_Gpu, reporter, ctxInfo) { GrContext* context = ctxInfo.fGrContext; for (auto& surface_func : { &create_gpu_surface, &create_gpu_scratch_surface }) { auto surface(surface_func(context, kOpaque_SkAlphaType, nullptr)); @@ -501,7 +501,7 @@ static void test_backend_handle_unique_id( REPORTER_ASSERT(reporter, image2->uniqueID() != image3->uniqueID()); } // No CPU test. -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SurfaceBackendHandleAccessIDs_Gpu, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceBackendHandleAccessIDs_Gpu, reporter, ctxInfo) { for (auto& surface_func : { &create_gpu_surface, &create_gpu_scratch_surface }) { for (auto& test_func : { &test_backend_handle_unique_id, &test_backend_handle_gen_id }) { for (auto& handle_access_func : diff --git a/tests/Test.h b/tests/Test.h index 1363f8c080..90a0139f56 100644 --- a/tests/Test.h +++ b/tests/Test.h @@ -170,6 +170,9 @@ private: #define DEF_GPUTEST_FOR_ALL_CONTEXTS(name, reporter, context_info) \ DEF_GPUTEST_FOR_CONTEXTS(name, nullptr, reporter, context_info) +#define DEF_GPUTEST_FOR_RENDERING_CONTEXTS(name, reporter, context_info) \ + DEF_GPUTEST_FOR_CONTEXTS(name, sk_gpu_test::GrContextFactory::IsRenderingContext, \ + reporter, context_info) #define DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(name, reporter, context_info) \ DEF_GPUTEST_FOR_CONTEXTS(name, &skiatest::IsGLContextType, reporter, context_info) #define DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(name, reporter, context_info) \ diff --git a/tests/TestTest.cpp b/tests/TestTest.cpp index 174c0e2459..5e5000ebca 100644 --- a/tests/TestTest.cpp +++ b/tests/TestTest.cpp @@ -38,7 +38,7 @@ DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(TestGpuAllContexts, reporter, ctxInfo) { // This is an example of a GPU test that tests a property that should work for all GPU contexts that // produce a rendering output. #if SK_SUPPORT_GPU -DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(TestGpuRenderingContexts, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(TestGpuRenderingContexts, reporter, ctxInfo) { REPORTER_ASSERT(reporter, reporter); REPORTER_ASSERT(reporter, ctxInfo.fGrContext); } |