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>
This commit is contained in:
Robert Phillips 2021-08-11 15:43:50 -04:00 committed by SkCQ
parent f4e176b98e
commit 06273bcb8a
57 changed files with 114 additions and 57 deletions

View File

@ -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"

View File

@ -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"

View File

@ -411,6 +411,7 @@ skia_gpu_sources = [
"$_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

View File

@ -29,7 +29,6 @@ samples_sources = [
"$_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 @@ samples_sources = [
"$_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

View File

@ -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"

View File

@ -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

View File

@ -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 {

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -14,6 +14,7 @@
class GrAtlasManager;
class GrSmallPathAtlasMgr;
class GrStrikeCache;
class GrThreadSafeCache;
/*
* Abstract interface that supports creating vertices, indices, and meshes, as well as

View File

@ -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;

View File

@ -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;

View File

@ -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 GrCaps;
class GrClearOp;
class GrGpuBuffer;
class GrRenderTargetProxy;
namespace skgpu { namespace v1 { class SurfaceDrawContext; }}
class GrOpsTask : public GrRenderTask {
public:

View File

@ -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"

View File

@ -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,

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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 @@ GrGeometryProcessor* GrAtlasTextOp::setupDfProcessor(SkArenaAlloc* arena,
}
#if GR_TEST_UTILS && SK_GPU_V1
#include "src/gpu/GrDrawOpTest.h"
GrOp::Owner GrAtlasTextOp::CreateOpTestingOnly(skgpu::v1::SurfaceDrawContext* sdc,
const SkPaint& skPaint,

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -10,6 +10,7 @@
#include "include/core/SkRefCnt.h"
#include "src/gpu/GrColor.h"
#include "src/gpu/ops/GrOp.h"
class GrDrawOp;
class GrPaint;

View File

@ -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,

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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:

View File

@ -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);
}

View File

@ -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 @@ public:
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,

View File

@ -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"

View File

@ -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;

View File

@ -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 @@ bool SurfaceDrawContext::stencilPath(const GrHardClip* clip,
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 @@ bool SurfaceDrawContext::stencilPath(const GrHardClip* clip,
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 @@ void SurfaceDrawContext::drawShape(const GrClip* clip,
/* 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 @@ bool SurfaceDrawContext::drawAndStencilPath(const GrHardClip* clip,
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 @@ bool SurfaceDrawContext::drawAndStencilPath(const GrHardClip* clip,
this->colorInfo().isLinearlyBlended()};
pr->drawPath(args);
return true;
#else
return false;
#endif
}
SkBudgeted SurfaceDrawContext::isBudgeted() const {
@ -1812,7 +1798,6 @@ void SurfaceDrawContext::drawShapeUsingPathRenderer(const GrClip* clip,
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 @@ void SurfaceDrawContext::drawShapeUsingPathRenderer(const GrClip* clip,
aaType,
this->colorInfo().isLinearlyBlended()};
pr->drawPath(args);
#endif // SK_GPU_V1
}
void SurfaceDrawContext::addDrawOp(const GrClip* clip,

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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,

View File

@ -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 {

View File

@ -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"
/**

View File

@ -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"

View File

@ -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,

View File

@ -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 @@ GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext* dContext,
return sContext->readSurfaceView();
}
#if SK_GPU_V1
GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView& writeView,
@ -117,6 +121,6 @@ GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
primitiveType, renderPassXferBarriers,
colorLoadOp, flags, stencilSettings);
}
#endif // SK_GPU_V1
} // namespace sk_gpu_test

View File

@ -28,6 +28,7 @@ GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext*,
GrSurfaceOrigin,
GrCPixmap pixmap);
#if SK_GPU_V1
GrProgramInfo* CreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView& writeView,
@ -41,7 +42,7 @@ GrProgramInfo* CreateProgramInfo(const GrCaps*,
GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone,
const GrUserStencilSettings* stencil =
&GrUserStencilSettings::kUnused);
#endif
} // namespace sk_gpu_test