skia2/gn/tests.gni
Michael Ludwig a195d101f9 New GrClipStack supporting only intersect/difference
Overview doc: https://docs.google.com/document/d/1ddIk74A1rL5Kj5kGcnInOYKVAXs3J2IsSgU5BLit0Ng/edit?usp=sharing

This is the new clip stack that will replace GrClipStackClip. The doc
link in the CL description has a much more detailed overview of what the
strategy of the new clip stack is, but at a very high level:

1. Add a temporary #define that lets SkGpuDevice switch between the old
stack and the new stack. For the new GrClipStack, it extends SkBaseDevice
directly and has to implement all of the device clipping virtuals.
   - If you look from patchset 5 and earlier, the define defaults to on
     so I can test it on the bots, etc. but the plan will be for it to
     default to off when this lands so it's only running on unit tests.
     Then in a follow up, I'll turn it on for our bots but keep it off in
     chrome and android. If everything looks good, chrome can then be
     turned on. There is a more extensive migration plan for android
     because of the expanding clip ops, but that is covered at the end of
     the overview doc.

2. GrClipStack manages save/restore logic of the stack and extends GrClip,
so the cpp file also includes code to apply a GrAppliedClip. At the moment
the apply strategy is as close to that in GrReducedClip and
GrClipStackClip as I could make it. Down the road, I think we can explore
other analytic coverage options and a clip atlas that replaces the unified
SW mask.
   - Once GrClipStack is enabled everywhere, it means GrReducedClip and
     GrClipStackClip can be deleted, so I'm not too worried about sharing
     code between the two. A lot is already shared through the use of
     GrSWMaskHelper and GrStencilMaskHelper.
   - SkClipStack and SkClipStackDevice are still used by the PDF and SVG
     backends, so they aren't necessarily deletable.

3. The GrClipStack only handles intersect and difference ops. It
represents all geometric clip operations as an element. The stack itself
is controlled by the "save record", which tracks aggregate bounds, valid
elements, and the non-geometric clip shader.
   - When a new save record is pushed on the stack, older elements are
     inactive. This means they cannot be modified, since they may need to
     be activated again when the current save is popped off the stack.
     However, they can still affect the clip during application.
   - When a new element is pushed on the stack, older elements may be
     invalidated. This means they don't need to be considered any more
     because they are redundant with the new clip shape (e.g. nested round
     rect clips only have to keep the innermost valid).


Bug: skia:10205
Change-Id: I68ccfd414033aa9014b102efaee3ad50a806f793
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308283
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-15 19:27:11 +00:00

411 lines
13 KiB
Plaintext

# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Things are easiest for everyone if these source paths are absolute.
_tests = get_path_info("../tests", "abspath")
tests_sources = [
"$_tests/AAClipTest.cpp",
"$_tests/AdvancedBlendTest.cpp",
"$_tests/AndroidCodecTest.cpp",
"$_tests/AnimatedImageTest.cpp",
"$_tests/AnnotationTest.cpp",
"$_tests/ApplyGammaTest.cpp",
"$_tests/ArenaAllocTest.cpp",
"$_tests/AsADashTest.cpp",
"$_tests/BRDTest.cpp",
"$_tests/BackendAllocationTest.cpp",
"$_tests/BackendSurfaceMutableStateTest.cpp",
"$_tests/BadIcoTest.cpp",
"$_tests/BitSetTest.cpp",
"$_tests/BitmapCopyTest.cpp",
"$_tests/BitmapGetColorTest.cpp",
"$_tests/BitmapTest.cpp",
"$_tests/BlendTest.cpp",
"$_tests/BlitMaskClip.cpp",
"$_tests/BlurTest.cpp",
"$_tests/BulkRectTest.cpp",
"$_tests/CTest.cpp",
"$_tests/CachedDataTest.cpp",
"$_tests/CachedDecodingPixelRefTest.cpp",
"$_tests/CanvasStateHelpers.cpp",
"$_tests/CanvasStateHelpers.h",
"$_tests/CanvasStateTest.cpp",
"$_tests/CanvasTest.cpp",
"$_tests/ChecksumTest.cpp",
"$_tests/ClearTest.cpp",
"$_tests/ClipBoundsTest.cpp",
"$_tests/ClipCubicTest.cpp",
"$_tests/ClipStackTest.cpp",
"$_tests/ClipperTest.cpp",
"$_tests/CodecAnimTest.cpp",
"$_tests/CodecExactReadTest.cpp",
"$_tests/CodecPartialTest.cpp",
"$_tests/CodecPriv.h",
"$_tests/CodecRecommendedTypeTest.cpp",
"$_tests/CodecTest.cpp",
"$_tests/ColorFilterTest.cpp",
"$_tests/ColorMatrixTest.cpp",
"$_tests/ColorPrivTest.cpp",
"$_tests/ColorSpaceTest.cpp",
"$_tests/ColorTest.cpp",
"$_tests/CompressedBackendAllocationTest.cpp",
"$_tests/CopySurfaceTest.cpp",
"$_tests/CrbugOssfuzz21688.cpp",
"$_tests/CubicMapTest.cpp",
"$_tests/DashPathEffectTest.cpp",
"$_tests/DataRefTest.cpp",
"$_tests/DebugLayerManagerTest.cpp",
"$_tests/DefaultPathRendererTest.cpp",
"$_tests/DeferredDisplayListTest.cpp",
"$_tests/DequeTest.cpp",
"$_tests/DescriptorTest.cpp",
"$_tests/DeviceTest.cpp",
"$_tests/DiscardableMemoryPoolTest.cpp",
"$_tests/DiscardableMemoryTest.cpp",
"$_tests/DrawBitmapRectTest.cpp",
"$_tests/DrawOpAtlasTest.cpp",
"$_tests/DrawPathTest.cpp",
"$_tests/DrawTextTest.cpp",
"$_tests/EmptyPathTest.cpp",
"$_tests/EncodeTest.cpp",
"$_tests/EncodedInfoTest.cpp",
"$_tests/ExifTest.cpp",
"$_tests/ExtendedSkColorTypeTests.cpp",
"$_tests/F16StagesTest.cpp",
"$_tests/FakeStreams.h",
"$_tests/FillPathTest.cpp",
"$_tests/FitsInTest.cpp",
"$_tests/FlattenDrawableTest.cpp",
"$_tests/FlattenableFactoryToName.cpp",
"$_tests/FlattenableNameToFactory.cpp",
"$_tests/Float16Test.cpp",
"$_tests/FloatingPointTextureTest.cpp",
"$_tests/FontHostStreamTest.cpp",
"$_tests/FontHostTest.cpp",
"$_tests/FontMgrAndroidParserTest.cpp",
"$_tests/FontMgrFontConfigTest.cpp",
"$_tests/FontMgrTest.cpp",
"$_tests/FontNamesTest.cpp",
"$_tests/FontTest.cpp",
"$_tests/FrontBufferedStreamTest.cpp",
"$_tests/GLBackendSurfaceTest.cpp",
"$_tests/GeometryTest.cpp",
"$_tests/GifTest.cpp",
"$_tests/GlyphRunTest.cpp",
"$_tests/GpuDrawPathTest.cpp",
"$_tests/GpuRectanizerTest.cpp",
"$_tests/GrAHardwareBufferTest.cpp",
"$_tests/GrBlockAllocatorTest.cpp",
"$_tests/GrCCPRTest.cpp",
"$_tests/GrClipStackTest.cpp",
"$_tests/GrContextAbandonTest.cpp",
"$_tests/GrContextFactoryTest.cpp",
"$_tests/GrContextOOM.cpp",
"$_tests/GrDDLImageTest.cpp",
"$_tests/GrFinishedFlushTest.cpp",
"$_tests/GrMemoryPoolTest.cpp",
"$_tests/GrMeshTest.cpp",
"$_tests/GrMipMappedTest.cpp",
"$_tests/GrOpListFlushTest.cpp",
"$_tests/GrPipelineDynamicStateTest.cpp",
"$_tests/GrPorterDuffTest.cpp",
"$_tests/GrQuadBufferTest.cpp",
"$_tests/GrQuadCropTest.cpp",
"$_tests/GrStyledShapeTest.cpp",
"$_tests/GrSubmittedFlushTest.cpp",
"$_tests/GrSurfaceTest.cpp",
"$_tests/GrTBlockListTest.cpp",
"$_tests/GrTestingBackendTextureUploadTest.cpp",
"$_tests/GrTextureMipMapInvalidationTest.cpp",
"$_tests/GrUploadPixelsTests.cpp",
"$_tests/GradientTest.cpp",
"$_tests/HSVRoundTripTest.cpp",
"$_tests/HashTest.cpp",
"$_tests/HighContrastFilterTest.cpp",
"$_tests/ICCTest.cpp",
"$_tests/ImageBitmapTest.cpp",
"$_tests/ImageCacheTest.cpp",
"$_tests/ImageFilterCacheTest.cpp",
"$_tests/ImageFilterTest.cpp",
"$_tests/ImageFrom565Bitmap.cpp",
"$_tests/ImageGeneratorTest.cpp",
"$_tests/ImageIsOpaqueTest.cpp",
"$_tests/ImageNewShaderTest.cpp",
"$_tests/ImageTest.cpp",
"$_tests/IncrTopoSortTest.cpp",
"$_tests/IndexedPngOverflowTest.cpp",
"$_tests/InfRectTest.cpp",
"$_tests/InsetConvexPolyTest.cpp",
"$_tests/InterpolatorTest.cpp",
"$_tests/InvalidIndexedPngTest.cpp",
"$_tests/IsClosedSingleContourTest.cpp",
"$_tests/JSONTest.cpp",
"$_tests/LListTest.cpp",
"$_tests/LRUCacheTest.cpp",
"$_tests/LayerDrawLooperTest.cpp",
"$_tests/LazyProxyTest.cpp",
"$_tests/M44Test.cpp",
"$_tests/MD5Test.cpp",
"$_tests/MallocPixelRefTest.cpp",
"$_tests/MaskCacheTest.cpp",
"$_tests/MathTest.cpp",
"$_tests/Matrix44Test.cpp",
"$_tests/MatrixClipCollapseTest.cpp",
"$_tests/MatrixColorFilterTest.cpp",
"$_tests/MatrixTest.cpp",
"$_tests/MemoryTest.cpp",
"$_tests/MemsetTest.cpp",
"$_tests/MessageBusTest.cpp",
"$_tests/MetaDataTest.cpp",
"$_tests/MipMapTest.cpp",
"$_tests/MultiPictureDocumentTest.cpp",
"$_tests/NdkDecodeTest.cpp",
"$_tests/NdkEncodeTest.cpp",
"$_tests/NonlinearBlendingTest.cpp",
"$_tests/OSPathTest.cpp",
"$_tests/OctoBoundsTest.cpp",
"$_tests/OffsetSimplePolyTest.cpp",
"$_tests/OnFlushCallbackTest.cpp",
"$_tests/OnceTest.cpp",
"$_tests/OpChainTest.cpp",
"$_tests/OverAlignedTest.cpp",
"$_tests/PDFDeflateWStreamTest.cpp",
"$_tests/PDFDocumentTest.cpp",
"$_tests/PDFGlyphsToUnicodeTest.cpp",
"$_tests/PDFJpegEmbedTest.cpp",
"$_tests/PDFMetadataAttributeTest.cpp",
"$_tests/PDFOpaqueSrcModeToSrcOverTest.cpp",
"$_tests/PDFPrimitivesTest.cpp",
"$_tests/PDFTaggedLinkTest.cpp",
"$_tests/PDFTaggedPruningTest.cpp",
"$_tests/PDFTaggedTableTest.cpp",
"$_tests/PDFTaggedTest.cpp",
"$_tests/PackBitsTest.cpp",
"$_tests/PackedConfigsTextureTest.cpp",
"$_tests/PaintImageFilterTest.cpp",
"$_tests/PaintTest.cpp",
"$_tests/ParametricStageTest.cpp",
"$_tests/ParseColorTest.cpp",
"$_tests/ParsePathTest.cpp",
"$_tests/PathBuilderTest.cpp",
"$_tests/PathCoverageTest.cpp",
"$_tests/PathMeasureTest.cpp",
"$_tests/PathRendererCacheTests.cpp",
"$_tests/PathTest.cpp",
"$_tests/PictureBBHTest.cpp",
"$_tests/PictureShaderTest.cpp",
"$_tests/PictureTest.cpp",
"$_tests/PinnedImageTest.cpp",
"$_tests/PixelRefTest.cpp",
"$_tests/Point3Test.cpp",
"$_tests/PointTest.cpp",
"$_tests/PolyUtilsTest.cpp",
"$_tests/PremulAlphaRoundTripTest.cpp",
"$_tests/PrimitiveProcessorTest.cpp",
"$_tests/ProcessorTest.cpp",
"$_tests/ProgramsTest.cpp",
"$_tests/PromiseImageTest.cpp",
"$_tests/ProxyConversionTest.cpp",
"$_tests/ProxyRefTest.cpp",
"$_tests/ProxyTest.cpp",
"$_tests/QuickRejectTest.cpp",
"$_tests/RRectInPathTest.cpp",
"$_tests/RTreeTest.cpp",
"$_tests/RandomTest.cpp",
"$_tests/ReadPixelsTest.cpp",
"$_tests/ReadWriteAlphaTest.cpp",
"$_tests/RecordDrawTest.cpp",
"$_tests/RecordOptsTest.cpp",
"$_tests/RecordPatternTest.cpp",
"$_tests/RecordTest.cpp",
"$_tests/RecordTestUtils.h",
"$_tests/RecorderTest.cpp",
"$_tests/RecordingXfermodeTest.cpp",
"$_tests/RectTest.cpp",
"$_tests/RefCntTest.cpp",
"$_tests/RegionTest.cpp",
"$_tests/RenderTargetContextTest.cpp",
"$_tests/RepeatedClippedBlurTest.cpp",
"$_tests/ResourceAllocatorTest.cpp",
"$_tests/ResourceCacheTest.cpp",
"$_tests/RoundRectTest.cpp",
"$_tests/SRGBReadWritePixelsTest.cpp",
"$_tests/SRGBTest.cpp",
"$_tests/SVGDeviceTest.cpp",
"$_tests/SafeMathTest.cpp",
"$_tests/SamplePatternDictionaryTest.cpp",
"$_tests/ScalarTest.cpp",
"$_tests/ScaleToSidesTest.cpp",
"$_tests/SerialProcsTest.cpp",
"$_tests/SerializationTest.cpp",
"$_tests/ShaderOpacityTest.cpp",
"$_tests/ShaderTest.cpp",
"$_tests/ShadowTest.cpp",
"$_tests/ShaperTest.cpp",
"$_tests/SizeTest.cpp",
"$_tests/SkBase64Test.cpp",
"$_tests/SkColor4fTest.cpp",
"$_tests/SkColorSpaceXformStepsTest.cpp",
"$_tests/SkDOMTest.cpp",
"$_tests/SkFixed15Test.cpp",
"$_tests/SkGaussFilterTest.cpp",
"$_tests/SkGlyphBufferTest.cpp",
"$_tests/SkImageTest.cpp",
"$_tests/SkNxTest.cpp",
"$_tests/SkPEGTest.cpp",
"$_tests/SkRasterPipelineTest.cpp",
"$_tests/SkRemoteGlyphCacheTest.cpp",
"$_tests/SkResourceCacheTest.cpp",
"$_tests/SkRuntimeEffectTest.cpp",
"$_tests/SkSLErrorTest.cpp",
"$_tests/SkSLFPTest.cpp",
"$_tests/SkSLGLSLTest.cpp",
"$_tests/SkSLInterpreterTest.cpp",
"$_tests/SkSLMemoryLayoutTest.cpp",
"$_tests/SkSLMetalTest.cpp",
"$_tests/SkSLSPIRVTest.cpp",
"$_tests/SkScalerCacheTest.cpp",
"$_tests/SkShaperJSONWriterTest.cpp",
"$_tests/SkSharedMutexTest.cpp",
"$_tests/SkStrikeCacheTest.cpp",
"$_tests/SkUTFTest.cpp",
"$_tests/SkVMTest.cpp",
"$_tests/SkVxTest.cpp",
"$_tests/Skbug5221.cpp",
"$_tests/Skbug6389.cpp",
"$_tests/Skbug6653.cpp",
"$_tests/SortTest.cpp",
"$_tests/SpecialImageTest.cpp",
"$_tests/SpecialSurfaceTest.cpp",
"$_tests/SrcOverTest.cpp",
"$_tests/SrcSrcOverBatchTest.cpp",
"$_tests/StreamBufferTest.cpp",
"$_tests/StreamTest.cpp",
"$_tests/StringTest.cpp",
"$_tests/StrokeTest.cpp",
"$_tests/StrokerTest.cpp",
"$_tests/SubsetPath.cpp",
"$_tests/SubsetPath.h",
"$_tests/SurfaceSemaphoreTest.cpp",
"$_tests/SurfaceTest.cpp",
"$_tests/SwizzlerTest.cpp",
"$_tests/TArrayTest.cpp",
"$_tests/TDPQueueTest.cpp",
"$_tests/TLazyTest.cpp",
"$_tests/TemplatesTest.cpp",
"$_tests/Test.cpp",
"$_tests/Test.h",
"$_tests/TestTest.cpp",
"$_tests/TestUtils.cpp",
"$_tests/TestUtils.h",
"$_tests/TextBlobCacheTest.cpp",
"$_tests/TextBlobTest.cpp",
"$_tests/TextureOpTest.cpp",
"$_tests/TextureProxyTest.cpp",
"$_tests/TextureStripAtlasManagerTest.cpp",
"$_tests/Time.cpp",
"$_tests/TopoSortTest.cpp",
"$_tests/TraceMemoryDumpTest.cpp",
"$_tests/TracingTest.cpp",
"$_tests/TransferPixelsTest.cpp",
"$_tests/TriangulatingPathRendererTests.cpp",
"$_tests/TypefaceTest.cpp",
"$_tests/UnicodeTest.cpp",
"$_tests/UtilsTest.cpp",
"$_tests/VerticesTest.cpp",
"$_tests/VkBackendSurfaceTest.cpp",
"$_tests/VkDrawableTest.cpp",
"$_tests/VkHardwareBufferTest.cpp",
"$_tests/VkPriorityExtensionTest.cpp",
"$_tests/VkProtectedContextTest.cpp",
"$_tests/VkWrapTests.cpp",
"$_tests/VkYcbcrSamplerTest.cpp",
"$_tests/VptrTest.cpp",
"$_tests/WindowRectanglesTest.cpp",
"$_tests/WritePixelsTest.cpp",
"$_tests/Writer32Test.cpp",
"$_tests/YUVCacheTest.cpp",
"$_tests/YUVTest.cpp",
]
gl_tests_sources = [
"$_tests/EGLImageTest.cpp",
"$_tests/GrGLExtensionsTest.cpp",
"$_tests/RectangleTextureTest.cpp",
"$_tests/TextureBindingsResetTest.cpp",
]
metal_tests_sources = [
"$_tests/MtlBackendAllocationTest.mm",
"$_tests/MtlCopySurfaceTest.mm",
]
pathops_tests_sources = [
"$_tests/PathOpsAngleIdeas.cpp",
"$_tests/PathOpsAngleTest.cpp",
"$_tests/PathOpsAsWindingTest.cpp",
"$_tests/PathOpsBattles.cpp",
"$_tests/PathOpsBoundsTest.cpp",
"$_tests/PathOpsBuildUseTest.cpp",
"$_tests/PathOpsBuilderConicTest.cpp",
"$_tests/PathOpsBuilderTest.cpp",
"$_tests/PathOpsChalkboardTest.cpp",
"$_tests/PathOpsConicIntersectionTest.cpp",
"$_tests/PathOpsConicLineIntersectionTest.cpp",
"$_tests/PathOpsConicQuadIntersectionTest.cpp",
"$_tests/PathOpsCubicConicIntersectionTest.cpp",
"$_tests/PathOpsCubicIntersectionTest.cpp",
"$_tests/PathOpsCubicIntersectionTestData.cpp",
"$_tests/PathOpsCubicIntersectionTestData.h",
"$_tests/PathOpsCubicLineIntersectionIdeas.cpp",
"$_tests/PathOpsCubicLineIntersectionTest.cpp",
"$_tests/PathOpsCubicQuadIntersectionTest.cpp",
"$_tests/PathOpsCubicReduceOrderTest.cpp",
"$_tests/PathOpsDCubicTest.cpp",
"$_tests/PathOpsDLineTest.cpp",
"$_tests/PathOpsDPointTest.cpp",
"$_tests/PathOpsDRectTest.cpp",
"$_tests/PathOpsDVectorTest.cpp",
"$_tests/PathOpsDebug.cpp",
"$_tests/PathOpsDebug.h",
"$_tests/PathOpsExtendedTest.cpp",
"$_tests/PathOpsExtendedTest.h",
"$_tests/PathOpsFuzz763Test.cpp",
"$_tests/PathOpsInverseTest.cpp",
"$_tests/PathOpsIssue3651.cpp",
"$_tests/PathOpsLineIntersectionTest.cpp",
"$_tests/PathOpsLineParametetersTest.cpp",
"$_tests/PathOpsOpCircleThreadedTest.cpp",
"$_tests/PathOpsOpCubicThreadedTest.cpp",
"$_tests/PathOpsOpLoopThreadedTest.cpp",
"$_tests/PathOpsOpRectThreadedTest.cpp",
"$_tests/PathOpsOpTest.cpp",
"$_tests/PathOpsQuadIntersectionTest.cpp",
"$_tests/PathOpsQuadIntersectionTestData.cpp",
"$_tests/PathOpsQuadIntersectionTestData.h",
"$_tests/PathOpsQuadLineIntersectionTest.cpp",
"$_tests/PathOpsQuadLineIntersectionThreadedTest.cpp",
"$_tests/PathOpsQuadReduceOrderTest.cpp",
"$_tests/PathOpsSimplifyDegenerateThreadedTest.cpp",
"$_tests/PathOpsSimplifyFailTest.cpp",
"$_tests/PathOpsSimplifyQuadThreadedTest.cpp",
"$_tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp",
"$_tests/PathOpsSimplifyRectThreadedTest.cpp",
"$_tests/PathOpsSimplifyTest.cpp",
"$_tests/PathOpsSimplifyTrianglesThreadedTest.cpp",
"$_tests/PathOpsSkpTest.cpp",
"$_tests/PathOpsTSectDebug.h",
"$_tests/PathOpsTestCommon.cpp",
"$_tests/PathOpsTestCommon.h",
"$_tests/PathOpsThreadedCommon.cpp",
"$_tests/PathOpsThreadedCommon.h",
"$_tests/PathOpsThreeWayTest.cpp",
"$_tests/PathOpsTigerTest.cpp",
"$_tests/PathOpsTightBoundsTest.cpp",
"$_tests/PathOpsTypesTest.cpp",
"$_tests/WangsFormulaTest.cpp",
]