1186b60fcf
Instead of taking the minimum required index/vertex count for an instance, DynamicInstances::append() now takes a proxy. The proxy can be used to calculate the index when it's needed at flush time, and can accumulate its internal state to represent a worst case that corresponds to the worst case index count as well. Updates the tessellating RenderSteps to use a single PatchAllocator definition that just swaps out how tess::LinearTolerances are converted to a vertex count. This will also work seamlessly with FixedCountStrokes. Removes stride() function from PatchAllocator because it's clunky to try and pass that out of DrawWriter or RenderStep to PatchWriter, and can be re-computed from fAttribs anyways. Since it's only re-used in PatchWriter for the deferred patch, it's one sum for every path contour and will likely not be noticed in perf. If it is, we can have PatchWriter remember it instead and keep PatchAllocator simple still. Bug: skia:13056, skia:13012 Change-Id: I52a36da4df23ebb01a98246458b6538744c1815f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540620 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
157 lines
4.4 KiB
Plaintext
157 lines
4.4 KiB
Plaintext
# Copyright 2021 Google LLC
|
|
#
|
|
# 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.
|
|
_src = get_path_info("../src/gpu/graphite", "abspath")
|
|
_include = get_path_info("../include/gpu/graphite", "abspath")
|
|
_include_private = get_path_info("../include/private/gpu/graphite", "abspath")
|
|
|
|
skia_graphite_public = [
|
|
"$_include/BackendTexture.h",
|
|
"$_include/Context.h",
|
|
"$_include/GraphiteTypes.h",
|
|
"$_include/Recorder.h",
|
|
"$_include/Recording.h",
|
|
"$_include/SkStuff.h",
|
|
"$_include/TextureInfo.h",
|
|
]
|
|
|
|
skia_graphite_sources = [
|
|
"$_src/Attribute.h",
|
|
"$_src/BackendTexture.cpp",
|
|
"$_src/Buffer.cpp",
|
|
"$_src/Buffer.h",
|
|
"$_src/Caps.cpp",
|
|
"$_src/Caps.h",
|
|
"$_src/ClipStack.cpp",
|
|
"$_src/ClipStack_graphite.h",
|
|
"$_src/CommandBuffer.cpp",
|
|
"$_src/CommandBuffer.h",
|
|
"$_src/Context.cpp",
|
|
"$_src/ContextPriv.cpp",
|
|
"$_src/ContextPriv.h",
|
|
"$_src/ContextUtils.cpp",
|
|
"$_src/ContextUtils.h",
|
|
"$_src/CopyTask.cpp",
|
|
"$_src/CopyTask.h",
|
|
"$_src/Device.cpp",
|
|
"$_src/Device.h",
|
|
"$_src/DrawBufferManager.cpp",
|
|
"$_src/DrawBufferManager.h",
|
|
"$_src/DrawContext.cpp",
|
|
"$_src/DrawContext.h",
|
|
"$_src/DrawList.cpp",
|
|
"$_src/DrawList.h",
|
|
"$_src/DrawOrder.h",
|
|
"$_src/DrawPass.cpp",
|
|
"$_src/DrawPass.h",
|
|
"$_src/DrawTypes.h",
|
|
"$_src/DrawWriter.cpp",
|
|
"$_src/DrawWriter.h",
|
|
"$_src/GlobalCache.cpp",
|
|
"$_src/GlobalCache.h",
|
|
"$_src/Gpu.cpp",
|
|
"$_src/Gpu.h",
|
|
"$_src/GpuWorkSubmission.cpp",
|
|
"$_src/GpuWorkSubmission.h",
|
|
"$_src/GraphicsPipeline.cpp",
|
|
"$_src/GraphicsPipeline.h",
|
|
"$_src/GraphicsPipelineDesc.cpp",
|
|
"$_src/GraphicsPipelineDesc.h",
|
|
"$_src/GraphiteResourceKey.cpp",
|
|
"$_src/GraphiteResourceKey.h",
|
|
"$_src/Image_Graphite.cpp",
|
|
"$_src/Image_Graphite.h",
|
|
"$_src/Log.h",
|
|
"$_src/PaintParams.cpp",
|
|
"$_src/PaintParams.h",
|
|
"$_src/PipelineDataCache.h",
|
|
"$_src/Recorder.cpp",
|
|
"$_src/RecorderPriv.cpp",
|
|
"$_src/RecorderPriv.h",
|
|
"$_src/Recording.cpp",
|
|
"$_src/RenderPassTask.cpp",
|
|
"$_src/RenderPassTask.h",
|
|
"$_src/Renderer.h",
|
|
"$_src/Resource.cpp",
|
|
"$_src/Resource.h",
|
|
"$_src/ResourceCache.cpp",
|
|
"$_src/ResourceCache.h",
|
|
"$_src/ResourceProvider.cpp",
|
|
"$_src/ResourceProvider.h",
|
|
"$_src/ResourceTypes.h",
|
|
"$_src/Sampler.cpp",
|
|
"$_src/Sampler.h",
|
|
"$_src/SkStuff.cpp",
|
|
"$_src/Surface_Graphite.cpp",
|
|
"$_src/Surface_Graphite.h",
|
|
"$_src/Task.cpp",
|
|
"$_src/Task.h",
|
|
"$_src/TaskGraph.cpp",
|
|
"$_src/TaskGraph.h",
|
|
"$_src/Texture.cpp",
|
|
"$_src/Texture.h",
|
|
"$_src/TextureInfo.cpp",
|
|
"$_src/TextureProxy.cpp",
|
|
"$_src/TextureProxy.h",
|
|
"$_src/TextureProxyView.h",
|
|
"$_src/TextureUtils.cpp",
|
|
"$_src/TextureUtils.h",
|
|
"$_src/UniformManager.cpp",
|
|
"$_src/UniformManager.h",
|
|
"$_src/UploadBufferManager.cpp",
|
|
"$_src/UploadBufferManager.h",
|
|
"$_src/UploadTask.cpp",
|
|
"$_src/UploadTask.h",
|
|
"$_src/geom/BoundsManager.h",
|
|
"$_src/geom/IntersectionTree.cpp",
|
|
"$_src/geom/IntersectionTree.h",
|
|
"$_src/geom/Rect.h",
|
|
"$_src/geom/Shape.cpp",
|
|
"$_src/geom/Shape.h",
|
|
"$_src/geom/Transform.cpp",
|
|
"$_src/geom/Transform_graphite.h",
|
|
"$_src/render/CoverBoundsRenderStep.cpp",
|
|
"$_src/render/CoverBoundsRenderStep.h",
|
|
"$_src/render/DynamicInstancesPatchAllocator.h",
|
|
"$_src/render/MiddleOutFanRenderStep.cpp",
|
|
"$_src/render/MiddleOutFanRenderStep.h",
|
|
"$_src/render/StencilAndCoverDSS.h",
|
|
"$_src/render/StencilAndFillPathRenderer.cpp",
|
|
"$_src/render/TessellateCurvesRenderStep.cpp",
|
|
"$_src/render/TessellateCurvesRenderStep.h",
|
|
"$_src/render/TessellateWedgesRenderStep.cpp",
|
|
"$_src/render/TessellateWedgesRenderStep.h",
|
|
]
|
|
|
|
skia_graphite_mtl_sources = [
|
|
"$_include/mtl/MtlBackendContext.h",
|
|
"$_include/mtl/MtlTypes.h",
|
|
"$_include_private/MtlTypesPriv.h",
|
|
"$_src/mtl/MtlBlitCommandEncoder.h",
|
|
"$_src/mtl/MtlBuffer.h",
|
|
"$_src/mtl/MtlBuffer.mm",
|
|
"$_src/mtl/MtlCaps.h",
|
|
"$_src/mtl/MtlCaps.mm",
|
|
"$_src/mtl/MtlCommandBuffer.h",
|
|
"$_src/mtl/MtlCommandBuffer.mm",
|
|
"$_src/mtl/MtlGpu.h",
|
|
"$_src/mtl/MtlGpu.mm",
|
|
"$_src/mtl/MtlGraphicsPipeline.h",
|
|
"$_src/mtl/MtlGraphicsPipeline.mm",
|
|
"$_src/mtl/MtlRenderCommandEncoder.h",
|
|
"$_src/mtl/MtlResourceProvider.h",
|
|
"$_src/mtl/MtlResourceProvider.mm",
|
|
"$_src/mtl/MtlSampler.h",
|
|
"$_src/mtl/MtlSampler.mm",
|
|
"$_src/mtl/MtlTexture.h",
|
|
"$_src/mtl/MtlTexture.mm",
|
|
"$_src/mtl/MtlTrampoline.h",
|
|
"$_src/mtl/MtlTrampoline.mm",
|
|
"$_src/mtl/MtlTypesPriv.mm",
|
|
"$_src/mtl/MtlUtils.h",
|
|
"$_src/mtl/MtlUtils.mm",
|
|
]
|