Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Static Public Member Functions | Private Member Functions | List of all members
GrWritePixelsTask Class Referencefinal

#include <GrWritePixelsRenderTask.h>

Inheritance diagram for GrWritePixelsTask:
GrRenderTask SkRefCnt SkRefCntBase

Static Public Member Functions

static sk_sp< GrRenderTaskMake (GrDrawingManager *, sk_sp< GrSurfaceProxy >, SkIRect, GrColorType srcColorType, GrColorType dstColorType, const GrMipLevel[], int levelCount)
 

Private Member Functions

bool onIsUsed (GrSurfaceProxy *proxy) const override
 
void gatherProxyIntervals (GrResourceAllocator *) const override
 
ExpectedOutcome onMakeClosed (GrRecordingContext *, SkIRect *targetUpdateBounds) override
 
bool onExecute (GrOpFlushState *) override
 

Additional Inherited Members

- 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
 
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
 
- 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)
 
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 *, true > fDeferredProxies
 

Detailed Description

Definition at line 13 of file GrWritePixelsRenderTask.h.

Member Function Documentation

◆ gatherProxyIntervals()

void GrWritePixelsTask::gatherProxyIntervals ( GrResourceAllocator alloc) const
overrideprivatevirtual

Implements GrRenderTask.

Definition at line 45 of file GrWritePixelsRenderTask.cpp.

45 {
46 alloc->addInterval(this->target(0), alloc->curOp(), alloc->curOp(),
49 alloc->incOps();
50}
void addInterval(GrSurfaceProxy *, unsigned int start, unsigned int end, ActualUse actualUse, AllowRecycling SkDEBUGCODE(, bool isDirectDstRead=false))
unsigned int curOp() const
uint32_t * target

◆ Make()

sk_sp< GrRenderTask > GrWritePixelsTask::Make ( GrDrawingManager dm,
sk_sp< GrSurfaceProxy dst,
SkIRect  rect,
GrColorType  srcColorType,
GrColorType  dstColorType,
const GrMipLevel  texels[],
int  levelCount 
)
static

Definition at line 14 of file GrWritePixelsRenderTask.cpp.

20 {
22 std::move(dst),
23 rect,
24 srcColorType,
25 dstColorType,
26 texels,
27 levelCount));
28}

◆ onExecute()

bool GrWritePixelsTask::onExecute ( GrOpFlushState flushState)
overrideprivatevirtual

Implements GrRenderTask.

Definition at line 58 of file GrWritePixelsRenderTask.cpp.

58 {
59 GrSurfaceProxy* dstProxy = this->target(0);
60 if (!dstProxy->isInstantiated()) {
61 return false;
62 }
63 GrSurface* dstSurface = dstProxy->peekSurface();
64 return flushState->gpu()->writePixels(dstSurface,
65 fRect,
66 fDstColorType,
67 fSrcColorType,
68 fLevels.get(),
69 fLevels.count());
70}
bool writePixels(GrSurface *surface, SkIRect rect, GrColorType surfaceColorType, GrColorType srcColorType, const GrMipLevel texels[], int mipLevelCount, bool prepForTexSampling=false)
Definition GrGpu.cpp:461
GrSurface * peekSurface() const
bool isInstantiated() const

◆ onIsUsed()

bool GrWritePixelsTask::onIsUsed ( GrSurfaceProxy proxy) const
inlineoverrideprivatevirtual

Implements GrRenderTask.

Definition at line 32 of file GrWritePixelsRenderTask.h.

32{ return false; }

◆ onMakeClosed()

GrRenderTask::ExpectedOutcome GrWritePixelsTask::onMakeClosed ( GrRecordingContext ,
SkIRect targetUpdateBounds 
)
overrideprivatevirtual

Implements GrRenderTask.

Definition at line 52 of file GrWritePixelsRenderTask.cpp.

53 {
54 *targetUpdateBounds = fRect;
56}

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