8#ifndef GrRenderTask_DEFINED
9#define GrRenderTask_DEFINED
111#if defined(GR_TEST_UTILS)
117 bool printDependencies,
119 virtual const char*
name()
const = 0;
123 virtual int numClips()
const {
return 0; }
127 void visitTargetAndSrcProxies_debugOnly(
const GrVisitProxyFunc& func)
const {
128 this->visitProxies_debugOnly(func);
137 if (
target.get() == proxy) {
155#if defined(GR_TEST_UTILS)
215 fFlags |= index << 7;
237 static uint32_t CreateUniqueID();
239 struct TopoSortTraits {
256 static bool IsTempMarked(
const GrRenderTask* renderTask) {
259 static int NumDependencies(
const GrRenderTask* renderTask) {
260 return renderTask->fDependencies.
size();
263 return renderTask->fDependencies[index];
272 const uint32_t fUniqueID;
std::function< void(GrSurfaceProxy *, skgpu::Mipmapped)> GrVisitProxyFunc
SkSpan(Container &&) -> SkSpan< std::remove_pointer_t< decltype(std::data(std::declval< Container >()))> >
static constexpr bool SkToBool(const T &x)
static void dump(const float m[20], SkYUVColorSpace cs, bool rgb2yuv)
virtual bool onIsUsed(GrSurfaceProxy *) const =0
SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrRenderTask)
GrSurfaceProxy * target(int i) const
virtual void onPrepare(GrOpFlushState *)
void addDependenciesFromOtherTask(GrRenderTask *otherTask)
SkSpan< GrRenderTask * > dependencies()
void setIndex(uint32_t index)
void prepare(GrOpFlushState *flushState)
bool isSetFlag(uint32_t flag) const
virtual void onPrePrepare(GrRecordingContext *)
virtual ExpectedOutcome onMakeClosed(GrRecordingContext *, SkIRect *targetUpdateBounds)=0
void setFlag(uint32_t flag)
virtual bool requiresExplicitCleanup() const
bool isInstantiated() const
void resetFlag(uint32_t flag)
virtual bool onExecute(GrOpFlushState *flushState)=0
bool isUsed(GrSurfaceProxy *proxy) const
bool dependsOn(const GrRenderTask *dependedOn) const
bool execute(GrOpFlushState *flushState)
uint32_t getIndex() const
void prePrepare(GrRecordingContext *context)
void addDependency(GrDrawingManager *, GrSurfaceProxy *dependedOn, skgpu::Mipmapped, GrTextureResolveManager, const GrCaps &caps)
bool blocksReordering() const
virtual void onMakeSkippable()
skia_private::STArray< 1, sk_sp< GrSurfaceProxy > > fTargets
void replaceDependency(const GrRenderTask *toReplace, GrRenderTask *replaceWith)
void addTarget(GrDrawingManager *dm, const GrSurfaceProxyView &view)
void replaceDependent(const GrRenderTask *toReplace, GrRenderTask *replaceWith)
virtual skgpu::ganesh::OpsTask * asOpsTask()
SkDEBUGCODE(~GrRenderTask() override;) void makeClosed(GrRecordingContext *)
virtual void disown(GrDrawingManager *)
SkSpan< GrRenderTask * > dependents()
virtual void endFlush(GrDrawingManager *)
skia_private::TArray< GrTextureProxy *, true > fDeferredProxies
uint32_t uniqueID() const
@ kBlocksReordering_Flag
No task can be reordered with respect to this task.
@ kWasOutput_Flag
Flag for topological sorting.
@ kAtlas_Flag
This task is atlas.
@ kSkippable_Flag
This task is skippable.
@ kClosed_Flag
This task can't accept any more dependencies.
@ kDisowned_Flag
This task is disowned by its GrDrawingManager.
@ kTempMark_Flag
Flag for topological sorting.
virtual void gatherProxyIntervals(GrResourceAllocator *) const =0
sk_sp< GrSurfaceProxy > refProxy() const
FlutterSemanticsFlag flag
DEF_SWITCHES_START aot vmservice shared library name