Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrD3DOpsRenderPass Class Reference

#include <GrD3DOpsRenderPass.h>

Inheritance diagram for GrD3DOpsRenderPass:
GrOpsRenderPass

Public Member Functions

 GrD3DOpsRenderPass (GrD3DGpu *)
 
 ~GrD3DOpsRenderPass () override
 
void inlineUpload (GrOpFlushState *state, GrDeferredTextureUploadFn &upload) override
 
void onExecuteDrawable (std::unique_ptr< SkDrawable::GpuDrawHandler >) override
 
bool set (GrRenderTarget *, GrSurfaceOrigin, const SkIRect &bounds, const GrOpsRenderPass::LoadAndStoreInfo &, const GrOpsRenderPass::StencilLoadAndStoreInfo &, const skia_private::TArray< GrSurfaceProxy *, true > &sampledProxies)
 
void submit ()
 
- Public Member Functions inherited from GrOpsRenderPass
virtual ~GrOpsRenderPass ()
 
void begin ()
 
void end ()
 
void bindPipeline (const GrProgramInfo &, const SkRect &drawBounds)
 
void setScissorRect (const SkIRect &)
 
void bindTextures (const GrGeometryProcessor &, const GrSurfaceProxy *const geomProcTextures[], const GrPipeline &)
 
void bindBuffers (sk_sp< const GrBuffer > indexBuffer, sk_sp< const GrBuffer > instanceBuffer, sk_sp< const GrBuffer > vertexBuffer, GrPrimitiveRestart=GrPrimitiveRestart::kNo)
 
void draw (int vertexCount, int baseVertex)
 
void drawIndexed (int indexCount, int baseIndex, uint16_t minIndexValue, uint16_t maxIndexValue, int baseVertex)
 
void drawInstanced (int instanceCount, int baseInstance, int vertexCount, int baseVertex)
 
void drawIndexedInstanced (int indexCount, int baseIndex, int instanceCount, int baseInstance, int baseVertex)
 
void drawIndirect (const GrBuffer *drawIndirectBuffer, size_t bufferOffset, int drawCount)
 
void drawIndexedIndirect (const GrBuffer *drawIndirectBuffer, size_t bufferOffset, int drawCount)
 
void drawIndexPattern (int patternIndexCount, int patternRepeatCount, int maxPatternRepetitionsInIndexBuffer, int patternVertexCount, int baseVertex)
 
virtual void inlineUpload (GrOpFlushState *, GrDeferredTextureUploadFn &)=0
 
void clear (const GrScissorState &scissor, std::array< float, 4 > color)
 
void clearStencilClip (const GrScissorState &scissor, bool insideStencilMask)
 
void executeDrawable (std::unique_ptr< SkDrawable::GpuDrawHandler >)
 

Additional Inherited Members

- Protected Member Functions inherited from GrOpsRenderPass
 GrOpsRenderPass ()
 
 GrOpsRenderPass (GrRenderTarget *rt, GrSurfaceOrigin origin)
 
void set (GrRenderTarget *rt, GrSurfaceOrigin origin)
 
- Protected Attributes inherited from GrOpsRenderPass
GrSurfaceOrigin fOrigin
 
GrRenderTargetfRenderTarget
 
sk_sp< const GrBufferfActiveIndexBuffer
 
sk_sp< const GrBufferfActiveVertexBuffer
 
sk_sp< const GrBufferfActiveInstanceBuffer
 

Detailed Description

Definition at line 19 of file GrD3DOpsRenderPass.h.

Constructor & Destructor Documentation

◆ GrD3DOpsRenderPass()

GrD3DOpsRenderPass::GrD3DOpsRenderPass ( GrD3DGpu gpu)

Definition at line 31 of file GrD3DOpsRenderPass.cpp.

31: fGpu(gpu) {}

◆ ~GrD3DOpsRenderPass()

GrD3DOpsRenderPass::~GrD3DOpsRenderPass ( )
override

Definition at line 53 of file GrD3DOpsRenderPass.cpp.

53{}

Member Function Documentation

◆ inlineUpload()

void GrD3DOpsRenderPass::inlineUpload ( GrOpFlushState state,
GrDeferredTextureUploadFn upload 
)
overridevirtual

Implements GrOpsRenderPass.

Definition at line 342 of file GrD3DOpsRenderPass.cpp.

342 {
343 // If we ever start using copy command lists for doing uploads, then we'll need to make sure
344 // we submit our main command list before doing the copy here and then start a new main command
345 // list.
346
347 fGpu->endRenderPass(fRenderTarget, fOrigin, fBounds);
348
349 // We pass in true here to signal that after the upload we need to set the upload texture's
350 // resource state back to D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE.
351 state->doUpload(upload, true);
352}
void endRenderPass(GrRenderTarget *target, GrSurfaceOrigin origin, const SkIRect &bounds)
Definition: GrD3DGpu.cpp:240
GrSurfaceOrigin fOrigin
GrRenderTarget * fRenderTarget
AtkStateType state
Definition: upload.py:1

◆ onExecuteDrawable()

void GrD3DOpsRenderPass::onExecuteDrawable ( std::unique_ptr< SkDrawable::GpuDrawHandler )
inlineoverridevirtual

Reimplemented from GrOpsRenderPass.

Definition at line 27 of file GrD3DOpsRenderPass.h.

27{}

◆ set()

bool GrD3DOpsRenderPass::set ( GrRenderTarget rt,
GrSurfaceOrigin  origin,
const SkIRect bounds,
const GrOpsRenderPass::LoadAndStoreInfo colorInfo,
const GrOpsRenderPass::StencilLoadAndStoreInfo stencilInfo,
const skia_private::TArray< GrSurfaceProxy *, true > &  sampledProxies 
)

Definition at line 33 of file GrD3DOpsRenderPass.cpp.

36 {
38 SkASSERT(fGpu == rt->getContext()->priv().getGpu());
39
40 this->INHERITED::set(rt, origin);
41
42 fBounds = bounds;
43
44 fColorLoadOp = colorInfo.fLoadOp;
45 fClearColor = colorInfo.fClearColor;
46 fStencilLoadOp = stencilInfo.fLoadOp;
47
48 // TODO
49
50 return true;
51}
#define SkASSERT(cond)
Definition: SkAssert.h:116
GrDirectContextPriv priv()
const GrDirectContext * getContext() const
void set(GrRenderTarget *rt, GrSurfaceOrigin origin)
Optional< SkRect > bounds
Definition: SkRecords.h:189
std::array< float, 4 > fClearColor

◆ submit()

void GrD3DOpsRenderPass::submit ( )

Definition at line 354 of file GrD3DOpsRenderPass.cpp.

354 {
355 if (!fRenderTarget) {
356 return;
357 }
358
359 // We don't use render passes in d3d, so there is nothing to submit here as all commands have
360 // already been recorded on the main command list. If in the future we start to use render
361 // passes on d3d12 devices that support them (most likely ARM devices), then we
362 // will submit them here.
363 fGpu->endRenderPass(fRenderTarget, fOrigin, fBounds);
364}

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