Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrDDLTask Class Referencefinal

#include <GrDDLTask.h>

Inheritance diagram for GrDDLTask:
GrRenderTask SkRefCnt SkRefCntBase

Public Member Functions

 GrDDLTask (GrDrawingManager *, sk_sp< GrRenderTargetProxy > ddlTarget, sk_sp< const GrDeferredDisplayList >)
 
 ~GrDDLTask () override
 
bool requiresExplicitCleanup () const override
 
void endFlush (GrDrawingManager *) override
 
void disown (GrDrawingManager *) override
 
- Public Member Functions inherited from GrRenderTask
 GrRenderTask ()
 
 SkDEBUGCODE (~GrRenderTask() override;) void makeClosed(GrRecordingContext *)
 
void prePrepare (GrRecordingContext *context)
 
void prepare (GrOpFlushState *flushState)
 
bool execute (GrOpFlushState *flushState)
 
virtual bool requiresExplicitCleanup () const
 
virtual void endFlush (GrDrawingManager *)
 
virtual void disown (GrDrawingManager *)
 
bool isClosed () const
 
void makeSkippable ()
 
bool isSkippable () const
 
bool blocksReordering () const
 
void addDependency (GrDrawingManager *, GrSurfaceProxy *dependedOn, skgpu::Mipmapped, GrTextureResolveManager, const GrCaps &caps)
 
void addDependenciesFromOtherTask (GrRenderTask *otherTask)
 
SkSpan< GrRenderTask * > dependencies ()
 
SkSpan< GrRenderTask * > dependents ()
 
void replaceDependency (const GrRenderTask *toReplace, GrRenderTask *replaceWith)
 
void replaceDependent (const GrRenderTask *toReplace, GrRenderTask *replaceWith)
 
bool dependsOn (const GrRenderTask *dependedOn) const
 
uint32_t uniqueID () const
 
int numTargets () const
 
GrSurfaceProxytarget (int i) const
 
virtual skgpu::ganesh::OpsTaskasOpsTask ()
 
bool isUsed (GrSurfaceProxy *proxy) const
 
virtual void gatherProxyIntervals (GrResourceAllocator *) const =0
 
bool isInstantiated () const
 
 SK_DECLARE_INTERNAL_LLIST_INTERFACE (GrRenderTask)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Additional Inherited Members

- Protected Types inherited from GrRenderTask
enum class  ExpectedOutcome : bool { kTargetUnchanged , kTargetDirty }
 
enum  Flags {
  kClosed_Flag = 0x01 , kDisowned_Flag = 0x02 , kSkippable_Flag = 0x04 , kAtlas_Flag = 0x08 ,
  kBlocksReordering_Flag = 0x10 , kWasOutput_Flag = 0x20 , kTempMark_Flag = 0x40
}
 
- Protected Member Functions inherited from GrRenderTask
 SkDEBUGCODE (bool deferredProxiesAreInstantiated() const ;) void addTarget(GrDrawingManager *
 
void addTarget (GrDrawingManager *dm, const GrSurfaceProxyView &view)
 
virtual ExpectedOutcome onMakeClosed (GrRecordingContext *, SkIRect *targetUpdateBounds)=0
 
void setFlag (uint32_t flag)
 
void resetFlag (uint32_t flag)
 
bool isSetFlag (uint32_t flag) const
 
void setIndex (uint32_t index)
 
uint32_t getIndex () const
 
- Protected Attributes inherited from GrRenderTask
 sk_sp< GrSurfaceProxy >
 
skia_private::STArray< 1, sk_sp< GrSurfaceProxy > > fTargets
 
skia_private::TArray< GrTextureProxy *, truefDeferredProxies
 

Detailed Description

This render task isolates the DDL's tasks from the rest of the DAG. This means that the DDL's tasks cannot be reordered by the topological sort and are always executed as a single block. It almost entirely just forwards calls down to the DDL's render tasks.

Definition at line 23 of file GrDDLTask.h.

Constructor & Destructor Documentation

◆ GrDDLTask()

GrDDLTask::GrDDLTask ( GrDrawingManager drawingMgr,
sk_sp< GrRenderTargetProxy ddlTarget,
sk_sp< const GrDeferredDisplayList ddl 
)

Definition at line 15 of file GrDDLTask.cpp.

18 : fDDL(std::move(ddl))
19 , fDDLTarget(std::move(ddlTarget)) {
20
21 for (auto& task : fDDL->priv().renderTasks()) {
22 SkASSERT(task->isClosed());
23
24 for (int i = 0; i < task->numTargets(); ++i) {
25 drawingMgr->setLastRenderTask(task->target(i), task.get());
26 }
27 }
28
29 // The DDL task never accepts additional tasks
30 this->setFlag(kClosed_Flag);
31}
#define SkASSERT(cond)
Definition: SkAssert.h:116
const skia_private::TArray< sk_sp< GrRenderTask > > & renderTasks() const
GrDeferredDisplayListPriv priv()
void setLastRenderTask(const GrSurfaceProxy *, GrRenderTask *)
void setFlag(uint32_t flag)
Definition: GrRenderTask.h:200
@ kClosed_Flag
This task can't accept any more dependencies.
Definition: GrRenderTask.h:190

◆ ~GrDDLTask()

GrDDLTask::~GrDDLTask ( )
override

Definition at line 33 of file GrDDLTask.cpp.

33{ }

Member Function Documentation

◆ disown()

void GrDDLTask::disown ( GrDrawingManager drawingManager)
overridevirtual

Reimplemented from GrRenderTask.

Definition at line 43 of file GrDDLTask.cpp.

43 {
44 for (auto& task : fDDL->priv().renderTasks()) {
45 task->disown(drawingManager);
46 }
47
48 INHERITED::disown(drawingManager);
49}
virtual void disown(GrDrawingManager *)

◆ endFlush()

void GrDDLTask::endFlush ( GrDrawingManager drawingManager)
overridevirtual

Reimplemented from GrRenderTask.

Definition at line 35 of file GrDDLTask.cpp.

35 {
36 for (auto& task : fDDL->priv().renderTasks()) {
37 task->endFlush(drawingManager);
38 }
39
40 INHERITED::endFlush(drawingManager);
41}
virtual void endFlush(GrDrawingManager *)
Definition: GrRenderTask.h:49

◆ requiresExplicitCleanup()

bool GrDDLTask::requiresExplicitCleanup ( ) const
inlineoverridevirtual

Reimplemented from GrRenderTask.

Definition at line 33 of file GrDDLTask.h.

33{ return true; }

The documentation for this class was generated from the following files: