Prepare headers for making all ops V1-only
Basically, ensure all the headers about to become V1-only only appear in contexts that are currently or will soon be V1-only.
This is almost all fallout from retracting some of the moving headers from other headers i.e.:
GrMeshDrawOp.h from GrOpFlushState.h
GrDrawOp.h from GrOpsRenderPass.h
GrDrawOp.h from GrOpsTask.h
GrSimpleMeshDrawOpHelper.h from GrTessellationShader.h
Bug: skia:11837
Change-Id: I939f5c82c3042e9ab00571b5796ab82dbe968085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438677
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/gm/aarecteffect.cpp b/gm/aarecteffect.cpp
index c900cec..a7176d8 100644
--- a/gm/aarecteffect.cpp
+++ b/gm/aarecteffect.cpp
@@ -20,6 +20,7 @@
#include "src/core/SkCanvasPriv.h"
#include "src/gpu/GrFragmentProcessor.h"
#include "src/gpu/GrPaint.h"
+#include "src/gpu/effects/GrPorterDuffXferProcessor.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
#include "tools/gpu/TestOps.h"
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 05747dc..87e931f 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -23,6 +23,7 @@
#include "src/gpu/GrFragmentProcessor.h"
#include "src/gpu/GrPaint.h"
#include "src/gpu/effects/GrConvexPolyEffect.h"
+#include "src/gpu/effects/GrPorterDuffXferProcessor.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
#include "tools/gpu/TestOps.h"
diff --git a/gn/gpu.gni b/gn/gpu.gni
index 6848e88..49365bf 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -411,6 +411,7 @@
"$_src/gpu/tessellate/shaders/GrStrokeTessellationShader.h",
"$_src/gpu/tessellate/shaders/GrStrokeTessellationShader_HardwareImpl.cpp",
"$_src/gpu/tessellate/shaders/GrStrokeTessellationShader_InstancedImpl.cpp",
+ "$_src/gpu/tessellate/shaders/GrTessellationShader.cpp",
"$_src/gpu/tessellate/shaders/GrTessellationShader.h",
# text
diff --git a/gn/samples.gni b/gn/samples.gni
index 211b7cf..86ce396 100644
--- a/gn/samples.gni
+++ b/gn/samples.gni
@@ -29,7 +29,6 @@
"$_samplecode/SampleComplexClip.cpp",
"$_samplecode/SampleCowboy.cpp",
"$_samplecode/SampleCusp.cpp",
- "$_samplecode/SampleDegenerateQuads.cpp",
"$_samplecode/SampleDegenerateTwoPtRadials.cpp",
"$_samplecode/SampleEffects.cpp",
"$_samplecode/SampleEmboss.cpp",
@@ -83,6 +82,9 @@
"$_samplecode/vertexdump.cpp",
]
-skgpu_v1_samples_sources = [ "$_samplecode/SamplePathTessellators.cpp" ]
+skgpu_v1_samples_sources = [
+ "$_samplecode/SampleDegenerateQuads.cpp",
+ "$_samplecode/SamplePathTessellators.cpp",
+]
samples_sources += skgpu_v1_samples_sources
diff --git a/samplecode/SamplePathTessellators.cpp b/samplecode/SamplePathTessellators.cpp
index de7346d..5379f71 100644
--- a/samplecode/SamplePathTessellators.cpp
+++ b/samplecode/SamplePathTessellators.cpp
@@ -12,7 +12,10 @@
#if SK_SUPPORT_GPU
#include "src/core/SkCanvasPriv.h"
+#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrRecordingContextPriv.h"
+#include "src/gpu/ops/GrDrawOp.h"
+#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
#include "src/gpu/tessellate/GrPathCurveTessellator.h"
#include "src/gpu/tessellate/GrPathWedgeTessellator.h"
#include "src/gpu/tessellate/shaders/GrPathTessellationShader.h"
diff --git a/src/core/SkGlyphRunPainter.cpp b/src/core/SkGlyphRunPainter.cpp
index ab2103f..dd07ef5 100644
--- a/src/core/SkGlyphRunPainter.cpp
+++ b/src/core/SkGlyphRunPainter.cpp
@@ -14,7 +14,6 @@
#include "src/gpu/GrDirectContextPriv.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/SkGr.h"
-#include "src/gpu/ops/GrAtlasTextOp.h"
#include "src/gpu/text/GrSDFTControl.h"
#include "src/gpu/text/GrTextBlobCache.h"
#if SK_GPU_V1
diff --git a/src/gpu/GrClipStack.cpp b/src/gpu/GrClipStack.cpp
index 6cce029..5a887c6 100644
--- a/src/gpu/GrClipStack.cpp
+++ b/src/gpu/GrClipStack.cpp
@@ -27,6 +27,7 @@
#include "src/gpu/effects/GrTextureEffect.h"
#include "src/gpu/geometry/GrQuadUtils.h"
#include "src/gpu/ops/GrAtlasPathRenderer.h"
+#include "src/gpu/ops/GrDrawOp.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
namespace {
diff --git a/src/gpu/GrDirectContext.cpp b/src/gpu/GrDirectContext.cpp
index 80eca7c..dd287b8 100644
--- a/src/gpu/GrDirectContext.cpp
+++ b/src/gpu/GrDirectContext.cpp
@@ -12,6 +12,7 @@
#include "include/gpu/GrContextThreadSafeProxy.h"
#include "src/core/SkAutoMalloc.h"
#include "src/core/SkTaskGroup.h"
+#include "src/core/SkTraceEvent.h"
#include "src/gpu/GrBackendUtils.h"
#include "src/gpu/GrClientMappedBufferManager.h"
#include "src/gpu/GrContextThreadSafeProxyPriv.h"
diff --git a/src/gpu/GrDirectContextPriv.cpp b/src/gpu/GrDirectContextPriv.cpp
index c992bc6..82e1491 100644
--- a/src/gpu/GrDirectContextPriv.cpp
+++ b/src/gpu/GrDirectContextPriv.cpp
@@ -17,6 +17,7 @@
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrTexture.h"
#include "src/gpu/GrThreadSafePipelineBuilder.h"
+#include "src/gpu/GrTracing.h"
#include "src/gpu/SkGr.h"
#include "src/gpu/SurfaceContext.h"
#include "src/gpu/SurfaceFillContext.h"
diff --git a/src/gpu/GrDrawOpTest.cpp b/src/gpu/GrDrawOpTest.cpp
index 5b93c3f..2c2e313 100644
--- a/src/gpu/GrDrawOpTest.cpp
+++ b/src/gpu/GrDrawOpTest.cpp
@@ -5,12 +5,13 @@
* found in the LICENSE file.
*/
+#include "src/gpu/GrDrawOpTest.h"
+
#include "include/core/SkTypes.h"
#include "include/private/GrContext_Base.h"
#include "include/utils/SkRandom.h"
#include "src/gpu/GrBaseContextPriv.h"
#include "src/gpu/GrCaps.h"
-#include "src/gpu/GrDrawOpTest.h"
#include "src/gpu/GrUserStencilSettings.h"
#if GR_TEST_UTILS
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 3b512f3..bf034f7 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -24,7 +24,6 @@
#include "src/gpu/GrMemoryPool.h"
#include "src/gpu/GrOnFlushResourceProvider.h"
#include "src/gpu/GrOpFlushState.h"
-#include "src/gpu/GrOpsTask.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrRenderTargetProxy.h"
#include "src/gpu/GrRenderTask.h"
@@ -44,6 +43,7 @@
#include "src/gpu/text/GrSDFTControl.h"
#include "src/image/SkSurface_Gpu.h"
+#include "src/gpu/GrOpsTask.h"
#if SK_GPU_V1
#include "src/gpu/GrSoftwarePathRenderer.h"
#endif
diff --git a/src/gpu/GrMeshDrawTarget.h b/src/gpu/GrMeshDrawTarget.h
index a3065f7..54fac0b 100644
--- a/src/gpu/GrMeshDrawTarget.h
+++ b/src/gpu/GrMeshDrawTarget.h
@@ -14,6 +14,7 @@
class GrAtlasManager;
class GrSmallPathAtlasMgr;
class GrStrikeCache;
+class GrThreadSafeCache;
/*
* Abstract interface that supports creating vertices, indices, and meshes, as well as
diff --git a/src/gpu/GrOpFlushState.h b/src/gpu/GrOpFlushState.h
index 58d70ae..f605ee2 100644
--- a/src/gpu/GrOpFlushState.h
+++ b/src/gpu/GrOpFlushState.h
@@ -18,7 +18,6 @@
#include "src/gpu/GrProgramInfo.h"
#include "src/gpu/GrRenderTargetProxy.h"
#include "src/gpu/GrSurfaceProxyView.h"
-#include "src/gpu/ops/GrMeshDrawOp.h"
class GrGpu;
class GrOpsRenderPass;
diff --git a/src/gpu/GrOpsRenderPass.h b/src/gpu/GrOpsRenderPass.h
index 246cbce..523b76c 100644
--- a/src/gpu/GrOpsRenderPass.h
+++ b/src/gpu/GrOpsRenderPass.h
@@ -9,8 +9,8 @@
#define GrOpsRenderPass_DEFINED
#include "include/core/SkDrawable.h"
+#include "src/gpu/GrDeferredUpload.h"
#include "src/gpu/GrPipeline.h"
-#include "src/gpu/ops/GrDrawOp.h"
class GrOpFlushState;
class GrGpu;
diff --git a/src/gpu/GrOpsTask.h b/src/gpu/GrOpsTask.h
index a6f2a37..16a9dd1 100644
--- a/src/gpu/GrOpsTask.h
+++ b/src/gpu/GrOpsTask.h
@@ -23,8 +23,8 @@
#include "src/gpu/GrAppliedClip.h"
#include "src/gpu/GrDstProxyView.h"
#include "src/gpu/GrGeometryProcessor.h"
+#include "src/gpu/GrProcessorSet.h"
#include "src/gpu/GrRenderTask.h"
-#include "src/gpu/ops/GrDrawOp.h"
#include "src/gpu/ops/GrOp.h"
class GrAuditTrail;
@@ -32,6 +32,7 @@
class GrClearOp;
class GrGpuBuffer;
class GrRenderTargetProxy;
+namespace skgpu { namespace v1 { class SurfaceDrawContext; }}
class GrOpsTask : public GrRenderTask {
public:
diff --git a/src/gpu/GrPathRenderer.cpp b/src/gpu/GrPathRenderer.cpp
index 3c25fa3..c2d5a9c 100644
--- a/src/gpu/GrPathRenderer.cpp
+++ b/src/gpu/GrPathRenderer.cpp
@@ -5,11 +5,12 @@
* found in the LICENSE file.
*/
+#include "src/gpu/GrPathRenderer.h"
+
#include "include/gpu/GrRecordingContext.h"
#include "src/core/SkDrawProcs.h"
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrPaint.h"
-#include "src/gpu/GrPathRenderer.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrUserStencilSettings.h"
#include "src/gpu/geometry/GrStyledShape.h"
diff --git a/src/gpu/GrProcessorAnalysis.cpp b/src/gpu/GrProcessorAnalysis.cpp
index 71f7823..a1624bd 100644
--- a/src/gpu/GrProcessorAnalysis.cpp
+++ b/src/gpu/GrProcessorAnalysis.cpp
@@ -6,9 +6,9 @@
*/
#include "src/gpu/GrCaps.h"
+#include "src/gpu/GrFragmentProcessor.h"
#include "src/gpu/GrGeometryProcessor.h"
#include "src/gpu/GrProcessorAnalysis.h"
-#include "src/gpu/ops/GrDrawOp.h"
GrColorFragmentProcessorAnalysis::GrColorFragmentProcessorAnalysis(
const GrProcessorAnalysisColor& input,
diff --git a/src/gpu/SurfaceContext.cpp b/src/gpu/SurfaceContext.cpp
index 335a8cc..9031f62 100644
--- a/src/gpu/SurfaceContext.cpp
+++ b/src/gpu/SurfaceContext.cpp
@@ -24,6 +24,7 @@
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrResourceProvider.h"
+#include "src/gpu/GrTracing.h"
#include "src/gpu/SkGr.h"
#include "src/gpu/SurfaceFillContext.h"
#include "src/gpu/effects/GrBicubicEffect.h"
diff --git a/src/gpu/d3d/GrD3DCaps.cpp b/src/gpu/d3d/GrD3DCaps.cpp
index d6c0668..5398f2a 100644
--- a/src/gpu/d3d/GrD3DCaps.cpp
+++ b/src/gpu/d3d/GrD3DCaps.cpp
@@ -6,6 +6,7 @@
*/
#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrContextOptions.h"
#include "include/gpu/d3d/GrD3DBackendContext.h"
#include "include/gpu/d3d/GrD3DTypes.h"
diff --git a/src/gpu/d3d/GrD3DCommandList.cpp b/src/gpu/d3d/GrD3DCommandList.cpp
index a1914e4..8fbc451 100644
--- a/src/gpu/d3d/GrD3DCommandList.cpp
+++ b/src/gpu/d3d/GrD3DCommandList.cpp
@@ -7,6 +7,7 @@
#include "src/gpu/d3d/GrD3DCommandList.h"
+#include "src/core/SkTraceEvent.h"
#include "src/gpu/GrScissorState.h"
#include "src/gpu/d3d/GrD3DAttachment.h"
#include "src/gpu/d3d/GrD3DBuffer.h"
diff --git a/src/gpu/gl/GrGLBuffer.cpp b/src/gpu/gl/GrGLBuffer.cpp
index b61d26b..ab7c02d 100644
--- a/src/gpu/gl/GrGLBuffer.cpp
+++ b/src/gpu/gl/GrGLBuffer.cpp
@@ -5,9 +5,11 @@
* found in the LICENSE file.
*/
-#include "include/core/SkTraceMemoryDump.h"
-#include "src/gpu/GrGpuResourcePriv.h"
#include "src/gpu/gl/GrGLBuffer.h"
+
+#include "include/core/SkTraceMemoryDump.h"
+#include "src/core/SkTraceEvent.h"
+#include "src/gpu/GrGpuResourcePriv.h"
#include "src/gpu/gl/GrGLCaps.h"
#include "src/gpu/gl/GrGLGpu.h"
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 0e5388d..7b6ae7b 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -8,6 +8,7 @@
#include "src/gpu/gl/GrGLTexture.h"
#include "include/core/SkTraceMemoryDump.h"
+#include "src/core/SkTraceEvent.h"
#include "src/gpu/GrSemaphore.h"
#include "src/gpu/GrShaderCaps.h"
#include "src/gpu/GrTexture.h"
diff --git a/src/gpu/gl/builders/GrGLShaderStringBuilder.cpp b/src/gpu/gl/builders/GrGLShaderStringBuilder.cpp
index de52f60..fc8a400 100644
--- a/src/gpu/gl/builders/GrGLShaderStringBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLShaderStringBuilder.cpp
@@ -6,6 +6,7 @@
*/
#include "src/core/SkAutoMalloc.h"
+#include "src/core/SkTraceEvent.h"
#include "src/gpu/GrShaderUtils.h"
#include "src/gpu/gl/GrGLGpu.h"
#include "src/gpu/gl/builders/GrGLShaderStringBuilder.h"
diff --git a/src/gpu/mtl/GrMtlCommandBuffer.mm b/src/gpu/mtl/GrMtlCommandBuffer.mm
index ac1dfd7..18f5f6f 100644
--- a/src/gpu/mtl/GrMtlCommandBuffer.mm
+++ b/src/gpu/mtl/GrMtlCommandBuffer.mm
@@ -7,6 +7,7 @@
#include "src/gpu/mtl/GrMtlCommandBuffer.h"
+#include "src/core/SkTraceEvent.h"
#include "src/gpu/mtl/GrMtlGpu.h"
#include "src/gpu/mtl/GrMtlOpsRenderPass.h"
#include "src/gpu/mtl/GrMtlPipelineState.h"
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 9b98913..f5b0ad7 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -5,6 +5,8 @@
* found in the LICENSE file.
*/
+#include "src/gpu/ops/GrAAConvexPathRenderer.h"
+
#include "include/core/SkString.h"
#include "include/core/SkTypes.h"
#include "src/core/SkGeometry.h"
@@ -25,7 +27,6 @@
#include "src/gpu/glsl/GrGLSLUniformHandler.h"
#include "src/gpu/glsl/GrGLSLVarying.h"
#include "src/gpu/glsl/GrGLSLVertexGeoBuilder.h"
-#include "src/gpu/ops/GrAAConvexPathRenderer.h"
#include "src/gpu/ops/GrMeshDrawOp.h"
#include "src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
index 2303da0..884eaef 100644
--- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
@@ -5,6 +5,8 @@
* found in the LICENSE file.
*/
+#include "src/gpu/ops/GrAAHairLinePathRenderer.h"
+
#include "include/core/SkPoint3.h"
#include "include/private/SkTemplates.h"
#include "src/core/SkGeometry.h"
@@ -26,7 +28,6 @@
#include "src/gpu/effects/GrBezierEffect.h"
#include "src/gpu/geometry/GrPathUtils.h"
#include "src/gpu/geometry/GrStyledShape.h"
-#include "src/gpu/ops/GrAAHairLinePathRenderer.h"
#include "src/gpu/ops/GrMeshDrawOp.h"
#include "src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
index 9a48f83..e8b46e3 100644
--- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
@@ -5,6 +5,8 @@
* found in the LICENSE file.
*/
+#include "src/gpu/ops/GrAALinearizingConvexPathRenderer.h"
+
#include "include/core/SkString.h"
#include "src/core/SkGeometry.h"
#include "src/core/SkPathPriv.h"
@@ -22,7 +24,6 @@
#include "src/gpu/geometry/GrPathUtils.h"
#include "src/gpu/geometry/GrStyledShape.h"
#include "src/gpu/ops/GrAAConvexTessellator.h"
-#include "src/gpu/ops/GrAALinearizingConvexPathRenderer.h"
#include "src/gpu/ops/GrMeshDrawOp.h"
#include "src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index a4dbbb4..6428a2d 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -29,10 +29,6 @@
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
#endif
-#if GR_TEST_UTILS
-#include "src/gpu/GrDrawOpTest.h"
-#endif
-
#include <new>
#include <utility>
@@ -489,6 +485,7 @@
}
#if GR_TEST_UTILS && SK_GPU_V1
+#include "src/gpu/GrDrawOpTest.h"
GrOp::Owner GrAtlasTextOp::CreateOpTestingOnly(skgpu::v1::SurfaceDrawContext* sdc,
const SkPaint& skPaint,
diff --git a/src/gpu/ops/GrDashLinePathRenderer.cpp b/src/gpu/ops/GrDashLinePathRenderer.cpp
index 7abd52f..9f7932a 100644
--- a/src/gpu/ops/GrDashLinePathRenderer.cpp
+++ b/src/gpu/ops/GrDashLinePathRenderer.cpp
@@ -5,10 +5,11 @@
* found in the LICENSE file.
*/
+#include "src/gpu/ops/GrDashLinePathRenderer.h"
+
#include "src/gpu/GrAuditTrail.h"
#include "src/gpu/GrGpu.h"
#include "src/gpu/geometry/GrStyledShape.h"
-#include "src/gpu/ops/GrDashLinePathRenderer.h"
#include "src/gpu/ops/GrDashOp.h"
#include "src/gpu/ops/GrMeshDrawOp.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp
index 86d2433..92f7ac8 100644
--- a/src/gpu/ops/GrDashOp.cpp
+++ b/src/gpu/ops/GrDashOp.cpp
@@ -5,6 +5,8 @@
* found in the LICENSE file.
*/
+#include "src/gpu/ops/GrDashOp.h"
+
#include "include/gpu/GrRecordingContext.h"
#include "src/core/SkMatrixPriv.h"
#include "src/core/SkPointPriv.h"
@@ -27,7 +29,6 @@
#include "src/gpu/glsl/GrGLSLUniformHandler.h"
#include "src/gpu/glsl/GrGLSLVarying.h"
#include "src/gpu/glsl/GrGLSLVertexGeoBuilder.h"
-#include "src/gpu/ops/GrDashOp.h"
#include "src/gpu/ops/GrMeshDrawOp.h"
#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp
index 1c7cee1..1a30f4a 100644
--- a/src/gpu/ops/GrOvalOpFactory.cpp
+++ b/src/gpu/ops/GrOvalOpFactory.cpp
@@ -5,6 +5,8 @@
* found in the LICENSE file.
*/
+#include "src/gpu/ops/GrOvalOpFactory.h"
+
#include "include/core/SkStrokeRec.h"
#include "src/core/SkMatrixPriv.h"
#include "src/core/SkRRectPriv.h"
@@ -24,7 +26,6 @@
#include "src/gpu/glsl/GrGLSLVarying.h"
#include "src/gpu/glsl/GrGLSLVertexGeoBuilder.h"
#include "src/gpu/ops/GrMeshDrawOp.h"
-#include "src/gpu/ops/GrOvalOpFactory.h"
#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
#include <utility>
diff --git a/src/gpu/ops/GrOvalOpFactory.h b/src/gpu/ops/GrOvalOpFactory.h
index 047679e..a4b39fb 100644
--- a/src/gpu/ops/GrOvalOpFactory.h
+++ b/src/gpu/ops/GrOvalOpFactory.h
@@ -10,6 +10,7 @@
#include "include/core/SkRefCnt.h"
#include "src/gpu/GrColor.h"
+#include "src/gpu/ops/GrOp.h"
class GrDrawOp;
class GrPaint;
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
index b3a2932..e76c885 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
@@ -5,13 +5,14 @@
* found in the LICENSE file.
*/
+#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
+
#include "src/gpu/GrAppliedClip.h"
#include "src/gpu/GrProcessorSet.h"
#include "src/gpu/GrProgramInfo.h"
#include "src/gpu/GrUserStencilSettings.h"
#include "src/gpu/SkGr.h"
#include "src/gpu/geometry/GrRect.h"
-#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
GrSimpleMeshDrawOpHelper::GrSimpleMeshDrawOpHelper(GrProcessorSet* processorSet,
GrAAType aaType,
diff --git a/src/gpu/tessellate/GrPathCurveTessellator.cpp b/src/gpu/tessellate/GrPathCurveTessellator.cpp
index 97bfc52..1122058 100644
--- a/src/gpu/tessellate/GrPathCurveTessellator.cpp
+++ b/src/gpu/tessellate/GrPathCurveTessellator.cpp
@@ -8,6 +8,8 @@
#include "src/gpu/tessellate/GrPathCurveTessellator.h"
#include "src/core/SkUtils.h"
+#include "src/gpu/GrMeshDrawTarget.h"
+#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/geometry/GrPathUtils.h"
#include "src/gpu/geometry/GrWangsFormula.h"
diff --git a/src/gpu/tessellate/GrPathStencilCoverOp.cpp b/src/gpu/tessellate/GrPathStencilCoverOp.cpp
index 9288f5c..a638f65 100644
--- a/src/gpu/tessellate/GrPathStencilCoverOp.cpp
+++ b/src/gpu/tessellate/GrPathStencilCoverOp.cpp
@@ -15,6 +15,7 @@
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
#include "src/gpu/glsl/GrGLSLVarying.h"
#include "src/gpu/glsl/GrGLSLVertexGeoBuilder.h"
+#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
#include "src/gpu/tessellate/GrMiddleOutPolygonTriangulator.h"
#include "src/gpu/tessellate/GrPathCurveTessellator.h"
#include "src/gpu/tessellate/GrPathWedgeTessellator.h"
diff --git a/src/gpu/tessellate/GrPathTessellateOp.cpp b/src/gpu/tessellate/GrPathTessellateOp.cpp
index 653a779..1dbb08c 100644
--- a/src/gpu/tessellate/GrPathTessellateOp.cpp
+++ b/src/gpu/tessellate/GrPathTessellateOp.cpp
@@ -7,6 +7,8 @@
#include "src/gpu/tessellate/GrPathTessellateOp.h"
+#include "src/gpu/GrAppliedClip.h"
+#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/tessellate/GrPathWedgeTessellator.h"
#include "src/gpu/tessellate/shaders/GrPathTessellationShader.h"
diff --git a/src/gpu/tessellate/GrPathWedgeTessellator.cpp b/src/gpu/tessellate/GrPathWedgeTessellator.cpp
index bd1455d..2b91b05 100644
--- a/src/gpu/tessellate/GrPathWedgeTessellator.cpp
+++ b/src/gpu/tessellate/GrPathWedgeTessellator.cpp
@@ -7,6 +7,8 @@
#include "src/gpu/tessellate/GrPathWedgeTessellator.h"
+#include "src/gpu/GrMeshDrawTarget.h"
+#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/geometry/GrPathUtils.h"
#include "src/gpu/geometry/GrWangsFormula.h"
diff --git a/src/gpu/tessellate/GrStrokeFixedCountTessellator.cpp b/src/gpu/tessellate/GrStrokeFixedCountTessellator.cpp
index 4e66de6..7c54407 100644
--- a/src/gpu/tessellate/GrStrokeFixedCountTessellator.cpp
+++ b/src/gpu/tessellate/GrStrokeFixedCountTessellator.cpp
@@ -8,6 +8,8 @@
#include "src/gpu/tessellate/GrStrokeFixedCountTessellator.h"
#include "src/core/SkGeometry.h"
+#include "src/gpu/GrMeshDrawTarget.h"
+#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/geometry/GrPathUtils.h"
#include "src/gpu/geometry/GrWangsFormula.h"
diff --git a/src/gpu/tessellate/GrStrokeHardwareTessellator.cpp b/src/gpu/tessellate/GrStrokeHardwareTessellator.cpp
index d6eca27..29ed20a 100644
--- a/src/gpu/tessellate/GrStrokeHardwareTessellator.cpp
+++ b/src/gpu/tessellate/GrStrokeHardwareTessellator.cpp
@@ -9,6 +9,8 @@
#include "src/core/SkMathPriv.h"
#include "src/core/SkPathPriv.h"
+#include "src/gpu/GrMeshDrawTarget.h"
+#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrVx.h"
#include "src/gpu/geometry/GrPathUtils.h"
diff --git a/src/gpu/tessellate/GrStrokeTessellateOp.cpp b/src/gpu/tessellate/GrStrokeTessellateOp.cpp
index 05fdafa..88fac80 100644
--- a/src/gpu/tessellate/GrStrokeTessellateOp.cpp
+++ b/src/gpu/tessellate/GrStrokeTessellateOp.cpp
@@ -8,6 +8,8 @@
#include "src/gpu/tessellate/GrStrokeTessellateOp.h"
#include "src/core/SkPathPriv.h"
+#include "src/gpu/GrAppliedClip.h"
+#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/tessellate/GrStrokeFixedCountTessellator.h"
#include "src/gpu/tessellate/GrStrokeHardwareTessellator.h"
diff --git a/src/gpu/tessellate/GrStrokeTessellator.h b/src/gpu/tessellate/GrStrokeTessellator.h
index 9a9f93d..264453f 100644
--- a/src/gpu/tessellate/GrStrokeTessellator.h
+++ b/src/gpu/tessellate/GrStrokeTessellator.h
@@ -11,6 +11,9 @@
#include "src/gpu/GrVx.h"
#include "src/gpu/tessellate/shaders/GrStrokeTessellationShader.h"
+class GrMeshDrawTarget;
+class GrOpFlushState;
+
// Prepares GPU data for, and then draws a stroke's tessellated geometry.
class GrStrokeTessellator {
public:
diff --git a/src/gpu/tessellate/shaders/GrTessellationShader.cpp b/src/gpu/tessellate/shaders/GrTessellationShader.cpp
new file mode 100644
index 0000000..05dc741
--- /dev/null
+++ b/src/gpu/tessellate/shaders/GrTessellationShader.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2021 Google LLC.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "src/gpu/tessellate/shaders/GrTessellationShader.h"
+
+#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
+
+const GrPipeline* GrTessellationShader::MakePipeline(const ProgramArgs& args,
+ GrAAType aaType,
+ GrAppliedClip&& appliedClip,
+ GrProcessorSet&& processors) {
+ auto pipelineFlags = GrPipeline::InputFlags::kNone;
+ if (aaType == GrAAType::kMSAA) {
+ pipelineFlags |= GrPipeline::InputFlags::kHWAntialias;
+ }
+ return GrSimpleMeshDrawOpHelper::CreatePipeline(
+ args.fCaps, args.fArena, args.fWriteView.swizzle(), std::move(appliedClip),
+ *args.fDstProxyView, std::move(processors), pipelineFlags);
+}
diff --git a/src/gpu/tessellate/shaders/GrTessellationShader.h b/src/gpu/tessellate/shaders/GrTessellationShader.h
index ef02ea1..01bd73b 100644
--- a/src/gpu/tessellate/shaders/GrTessellationShader.h
+++ b/src/gpu/tessellate/shaders/GrTessellationShader.h
@@ -11,7 +11,6 @@
#include "src/gpu/GrGeometryProcessor.h"
#include "src/gpu/GrProgramInfo.h"
#include "src/gpu/GrVertexWriter.h"
-#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
class SkArenaAlloc;
@@ -67,19 +66,11 @@
const GrCaps* fCaps;
};
- static const GrPipeline* MakePipeline(const ProgramArgs& args, GrAAType aaType,
- GrAppliedClip&& appliedClip,
- GrProcessorSet&& processors) {
- auto pipelineFlags = GrPipeline::InputFlags::kNone;
- if (aaType == GrAAType::kMSAA) {
- pipelineFlags |= GrPipeline::InputFlags::kHWAntialias;
- }
- return GrSimpleMeshDrawOpHelper::CreatePipeline(
- args.fCaps, args.fArena, args.fWriteView.swizzle(), std::move(appliedClip),
- *args.fDstProxyView, std::move(processors), pipelineFlags);
- }
+ static const GrPipeline* MakePipeline(const ProgramArgs&, GrAAType,
+ GrAppliedClip&&, GrProcessorSet&&);
- static GrProgramInfo* MakeProgram(const ProgramArgs& args, const GrTessellationShader* shader,
+ static GrProgramInfo* MakeProgram(const ProgramArgs& args,
+ const GrTessellationShader* shader,
const GrPipeline* pipeline,
const GrUserStencilSettings* stencil) {
return args.fArena->make<GrProgramInfo>(args.fWriteView, pipeline, stencil, shader,
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index af8d63a..3979ce0 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -13,7 +13,6 @@
#include "src/core/SkMatrixProvider.h"
#include "src/core/SkPaintPriv.h"
#include "src/core/SkStrikeSpec.h"
-#include "src/gpu/GrBlurUtils.h"
#include "src/gpu/GrClip.h"
#include "src/gpu/GrMemoryPool.h"
#include "src/gpu/GrMeshDrawTarget.h"
@@ -28,6 +27,7 @@
#include "src/gpu/text/GrTextBlob.h"
#if SK_GPU_V1
+#include "src/gpu/GrBlurUtils.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
#else
#include "src/gpu/SurfaceContext.h"
diff --git a/src/gpu/text/GrTextBlob.h b/src/gpu/text/GrTextBlob.h
index e4b2491..de9dbcf 100644
--- a/src/gpu/text/GrTextBlob.h
+++ b/src/gpu/text/GrTextBlob.h
@@ -23,7 +23,9 @@
#include "src/core/SkTLazy.h"
#include "src/gpu/GrColor.h"
#include "src/gpu/GrSubRunAllocator.h"
+#if SK_GPU_V1
#include "src/gpu/ops/GrOp.h"
+#endif
class GrAtlasManager;
class GrAtlasTextOp;
diff --git a/src/gpu/v1/SurfaceDrawContext.cpp b/src/gpu/v1/SurfaceDrawContext.cpp
index 47e8d40..0b7df02 100644
--- a/src/gpu/v1/SurfaceDrawContext.cpp
+++ b/src/gpu/v1/SurfaceDrawContext.cpp
@@ -27,7 +27,6 @@
#include "src/core/SkRRectPriv.h"
#include "src/gpu/GrAppliedClip.h"
#include "src/gpu/GrAttachment.h"
-#include "src/gpu/GrBlurUtils.h"
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrClip.h"
#include "src/gpu/GrColor.h"
@@ -38,6 +37,7 @@
#include "src/gpu/GrImageContextPriv.h"
#include "src/gpu/GrImageInfo.h"
#include "src/gpu/GrMemoryPool.h"
+#include "src/gpu/GrPathRenderer.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrRenderTarget.h"
#include "src/gpu/GrResourceProvider.h"
@@ -71,10 +71,6 @@
#include "src/gpu/text/GrSDFTControl.h"
#include "src/gpu/text/GrTextBlobCache.h"
-#if SK_GPU_V1
-#include "src/gpu/GrPathRenderer.h"
-#endif
-
#define ASSERT_OWNED_RESOURCE(R) SkASSERT(!(R) || (R)->getContext() == this->drawingManager()->getContext())
#define ASSERT_SINGLE_OWNER GR_ASSERT_SINGLE_OWNER(this->singleOwner())
#define RETURN_IF_ABANDONED if (fContext->abandoned()) { return; }
@@ -934,7 +930,6 @@
GrAA doStencilMSAA,
const SkMatrix& viewMatrix,
const SkPath& path) {
-#if SK_GPU_V1
SkIRect clipBounds = clip ? clip->getConservativeBounds()
: SkIRect::MakeSize(this->dimensions());
GrStyledShape shape(path, GrStyledShape::DoSimplify::kNo);
@@ -966,9 +961,6 @@
args.fDoStencilMSAA = doStencilMSAA;
pr->stencilPath(args);
return true;
-#else
- return false;
-#endif // SK_GPU_V1
}
void SurfaceDrawContext::drawTextureSet(const GrClip* clip,
@@ -1608,11 +1600,9 @@
/* attemptDrawSimple */ true);
}
-#if SK_GPU_V1
static SkIRect get_clip_bounds(const SurfaceDrawContext* sdc, const GrClip* clip) {
return clip ? clip->getConservativeBounds() : SkIRect::MakeWH(sdc->width(), sdc->height());
}
-#endif // SK_GPU_V1
bool SurfaceDrawContext::drawAndStencilPath(const GrHardClip* clip,
const GrUserStencilSettings* ss,
@@ -1621,7 +1611,6 @@
GrAA aa,
const SkMatrix& viewMatrix,
const SkPath& path) {
-#if SK_GPU_V1
ASSERT_SINGLE_OWNER
RETURN_FALSE_IF_ABANDONED
SkDEBUGCODE(this->validate();)
@@ -1680,9 +1669,6 @@
this->colorInfo().isLinearlyBlended()};
pr->drawPath(args);
return true;
-#else
- return false;
-#endif
}
SkBudgeted SurfaceDrawContext::isBudgeted() const {
@@ -1812,7 +1798,6 @@
const SkMatrix& viewMatrix,
GrStyledShape&& shape,
bool attemptDrawSimple) {
-#if SK_GPU_V1
ASSERT_SINGLE_OWNER
RETURN_IF_ABANDONED
GR_CREATE_TRACE_MARKER_CONTEXT("SurfaceDrawContext", "internalDrawPath", fContext);
@@ -1922,7 +1907,6 @@
aaType,
this->colorInfo().isLinearlyBlended()};
pr->drawPath(args);
-#endif // SK_GPU_V1
}
void SurfaceDrawContext::addDrawOp(const GrClip* clip,
diff --git a/src/gpu/vk/GrVkCommandBuffer.cpp b/src/gpu/vk/GrVkCommandBuffer.cpp
index 63374ad..056d71d 100644
--- a/src/gpu/vk/GrVkCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkCommandBuffer.cpp
@@ -8,6 +8,7 @@
#include "src/gpu/vk/GrVkCommandBuffer.h"
#include "include/core/SkRect.h"
+#include "src/core/SkTraceEvent.h"
#include "src/gpu/vk/GrVkBuffer.h"
#include "src/gpu/vk/GrVkCommandPool.h"
#include "src/gpu/vk/GrVkFramebuffer.h"
diff --git a/src/gpu/vk/GrVkCommandPool.cpp b/src/gpu/vk/GrVkCommandPool.cpp
index 0a9db05..620df7d 100644
--- a/src/gpu/vk/GrVkCommandPool.cpp
+++ b/src/gpu/vk/GrVkCommandPool.cpp
@@ -7,6 +7,7 @@
#include "src/gpu/vk/GrVkCommandPool.h"
+#include "src/core/SkTraceEvent.h"
#include "src/gpu/GrDirectContextPriv.h"
#include "src/gpu/vk/GrVkCommandBuffer.h"
#include "src/gpu/vk/GrVkGpu.h"
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 656397a..7c29173 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -15,6 +15,7 @@
#include "src/core/SkCompressedDataUtils.h"
#include "src/core/SkConvertPixels.h"
#include "src/core/SkMipmap.h"
+#include "src/core/SkTraceEvent.h"
#include "src/gpu/GrBackendUtils.h"
#include "src/gpu/GrDataUtils.h"
#include "src/gpu/GrDirectContextPriv.h"
diff --git a/src/gpu/vk/GrVkResourceProvider.cpp b/src/gpu/vk/GrVkResourceProvider.cpp
index 460e86e..c359915 100644
--- a/src/gpu/vk/GrVkResourceProvider.cpp
+++ b/src/gpu/vk/GrVkResourceProvider.cpp
@@ -9,6 +9,7 @@
#include "include/gpu/GrDirectContext.h"
#include "src/core/SkTaskGroup.h"
+#include "src/core/SkTraceEvent.h"
#include "src/gpu/GrDirectContextPriv.h"
#include "src/gpu/GrSamplerState.h"
#include "src/gpu/GrStencilSettings.h"
diff --git a/src/gpu/vk/GrVkSecondaryCBDrawContext.cpp b/src/gpu/vk/GrVkSecondaryCBDrawContext.cpp
index 0aaf8e5..4293b58 100644
--- a/src/gpu/vk/GrVkSecondaryCBDrawContext.cpp
+++ b/src/gpu/vk/GrVkSecondaryCBDrawContext.cpp
@@ -18,6 +18,8 @@
#include "src/gpu/GrDirectContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrRecordingContextPriv.h"
+#include "src/gpu/GrRenderTargetProxy.h"
+#include "src/gpu/GrSurfaceProxyView.h"
sk_sp<GrVkSecondaryCBDrawContext> GrVkSecondaryCBDrawContext::Make(GrRecordingContext* rContext,
const SkImageInfo& imageInfo,
diff --git a/tests/GrClipStackTest.cpp b/tests/GrClipStackTest.cpp
index 9c69e6e..470a78a 100644
--- a/tests/GrClipStackTest.cpp
+++ b/tests/GrClipStackTest.cpp
@@ -20,6 +20,7 @@
#include "src/core/SkRectPriv.h"
#include "src/gpu/GrDirectContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
+#include "src/gpu/ops/GrDrawOp.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
namespace {
diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp
index 9dff991..cdd1095 100644
--- a/tests/GrPipelineDynamicStateTest.cpp
+++ b/tests/GrPipelineDynamicStateTest.cpp
@@ -23,6 +23,7 @@
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
#include "src/gpu/glsl/GrGLSLVarying.h"
#include "src/gpu/glsl/GrGLSLVertexGeoBuilder.h"
+#include "src/gpu/ops/GrDrawOp.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
/**
diff --git a/tests/GrThreadSafeCacheTest.cpp b/tests/GrThreadSafeCacheTest.cpp
index 6b0baa4..f8d1704 100644
--- a/tests/GrThreadSafeCacheTest.cpp
+++ b/tests/GrThreadSafeCacheTest.cpp
@@ -22,6 +22,7 @@
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/GrStyle.h"
#include "src/gpu/GrThreadSafeCache.h"
+#include "src/gpu/ops/GrDrawOp.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
#include "tests/Test.h"
#include "tests/TestUtils.h"
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index 7c838b9..526f29c 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -23,6 +23,7 @@
#include "src/gpu/GrTextureProxyPriv.h"
#include "src/gpu/effects/GrTextureEffect.h"
#include "src/gpu/mock/GrMockGpu.h"
+#include "src/gpu/ops/GrDrawOp.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
// This test verifies that lazy proxy callbacks get invoked during flush, after onFlush callbacks,
diff --git a/tools/gpu/ProxyUtils.cpp b/tools/gpu/ProxyUtils.cpp
index c0e8d63..2e998a7 100644
--- a/tools/gpu/ProxyUtils.cpp
+++ b/tools/gpu/ProxyUtils.cpp
@@ -20,9 +20,12 @@
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/SkGr.h"
#include "src/gpu/SurfaceContext.h"
-#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
#include "src/image/SkImage_Base.h"
+#if SK_GPU_V1
+#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
+#endif
+
namespace sk_gpu_test {
GrTextureProxy* GetTextureImageProxy(SkImage* image, GrRecordingContext* rContext) {
@@ -88,6 +91,7 @@
return sContext->readSurfaceView();
}
+#if SK_GPU_V1
GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView& writeView,
@@ -117,6 +121,6 @@
primitiveType, renderPassXferBarriers,
colorLoadOp, flags, stencilSettings);
}
-
+#endif // SK_GPU_V1
} // namespace sk_gpu_test
diff --git a/tools/gpu/ProxyUtils.h b/tools/gpu/ProxyUtils.h
index bc2dafe..198af97 100644
--- a/tools/gpu/ProxyUtils.h
+++ b/tools/gpu/ProxyUtils.h
@@ -28,6 +28,7 @@
GrSurfaceOrigin,
GrCPixmap pixmap);
+#if SK_GPU_V1
GrProgramInfo* CreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView& writeView,
@@ -41,7 +42,7 @@
GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone,
const GrUserStencilSettings* stencil =
&GrUserStencilSettings::kUnused);
-
+#endif
} // namespace sk_gpu_test