8#ifndef GrOpsRenderPass_DEFINED
9#define GrOpsRenderPass_DEFINED
96 void draw(
int vertexCount,
int baseVertex);
97 void drawIndexed(
int indexCount,
int baseIndex, uint16_t minIndexValue, uint16_t maxIndexValue,
101 void drawInstanced(
int instanceCount,
int baseInstance,
int vertexCount,
int baseVertex);
128 int maxPatternRepetitionsInIndexBuffer,
int patternVertexCount,
179 void resetActiveBuffers() {
185 bool prepareToDraw();
197 virtual void onDraw(
int vertexCount,
int baseVertex) = 0;
198 virtual void onDrawIndexed(
int indexCount,
int baseIndex, uint16_t minIndexValue,
199 uint16_t maxIndexValue,
int baseVertex) = 0;
203 int baseInstance,
int baseVertex) = 0;
214 enum class DrawPipelineStatus {
220 DrawPipelineStatus fDrawPipelineStatus = DrawPipelineStatus::kNotConfigured;
224 enum class DynamicStateStatus {
230 DynamicStateStatus fScissorStatus;
231 DynamicStateStatus fTextureBindingStatus;
232 bool fHasIndexBuffer;
233 DynamicStateStatus fInstanceBufferStatus;
234 DynamicStateStatus fVertexBufferStatus;
std::function< void(GrDeferredTextureUploadWritePixelsFn &)> GrDeferredTextureUploadFn
@ kTopLeft_GrSurfaceOrigin
#define SK_ABORT(message,...)
void bindTextures(const GrGeometryProcessor &, const GrSurfaceProxy *const geomProcTextures[], const GrPipeline &)
virtual void inlineUpload(GrOpFlushState *, GrDeferredTextureUploadFn &)=0
virtual void onSetScissorRect(const SkIRect &)=0
virtual void onExecuteDrawable(std::unique_ptr< SkDrawable::GpuDrawHandler >)
void bindPipeline(const GrProgramInfo &, const SkRect &drawBounds)
sk_sp< const GrBuffer > fActiveIndexBuffer
void draw(int vertexCount, int baseVertex)
virtual bool onBindTextures(const GrGeometryProcessor &, const GrSurfaceProxy *const geomProcTextures[], const GrPipeline &)=0
void clear(const GrScissorState &scissor, std::array< float, 4 > color)
sk_sp< const GrBuffer > fActiveInstanceBuffer
void drawInstanced(int instanceCount, int baseInstance, int vertexCount, int baseVertex)
void drawIndexPattern(int patternIndexCount, int patternRepeatCount, int maxPatternRepetitionsInIndexBuffer, int patternVertexCount, int baseVertex)
virtual void onClearStencilClip(const GrScissorState &, bool insideStencilMask)=0
virtual void onDrawIndexedIndirect(const GrBuffer *, size_t offset, int drawCount)
sk_sp< const GrBuffer > fActiveVertexBuffer
virtual void onDrawIndexed(int indexCount, int baseIndex, uint16_t minIndexValue, uint16_t maxIndexValue, int baseVertex)=0
virtual void onBindBuffers(sk_sp< const GrBuffer > indexBuffer, sk_sp< const GrBuffer > instanceBuffer, sk_sp< const GrBuffer > vertexBuffer, GrPrimitiveRestart)=0
virtual void onDrawIndexedInstanced(int indexCount, int baseIndex, int instanceCount, int baseInstance, int baseVertex)=0
void executeDrawable(std::unique_ptr< SkDrawable::GpuDrawHandler >)
void bindBuffers(sk_sp< const GrBuffer > indexBuffer, sk_sp< const GrBuffer > instanceBuffer, sk_sp< const GrBuffer > vertexBuffer, GrPrimitiveRestart=GrPrimitiveRestart::kNo)
void set(GrRenderTarget *rt, GrSurfaceOrigin origin)
void setScissorRect(const SkIRect &)
virtual void onDrawInstanced(int instanceCount, int baseInstance, int vertexCount, int baseVertex)=0
GrOpsRenderPass(GrRenderTarget *rt, GrSurfaceOrigin origin)
void drawIndexed(int indexCount, int baseIndex, uint16_t minIndexValue, uint16_t maxIndexValue, int baseVertex)
virtual void onDrawIndirect(const GrBuffer *, size_t offset, int drawCount)
virtual ~GrOpsRenderPass()
void drawIndexedIndirect(const GrBuffer *drawIndirectBuffer, size_t bufferOffset, int drawCount)
virtual bool onBindPipeline(const GrProgramInfo &, const SkRect &drawBounds)=0
virtual void onClear(const GrScissorState &, std::array< float, 4 > color)=0
void drawIndexedInstanced(int indexCount, int baseIndex, int instanceCount, int baseInstance, int baseVertex)
void drawIndirect(const GrBuffer *drawIndirectBuffer, size_t bufferOffset, int drawCount)
void clearStencilClip(const GrScissorState &scissor, bool insideStencilMask)
virtual void onDraw(int vertexCount, int baseVertex)=0
GrRenderTarget * fRenderTarget
void reset(T *ptr=nullptr)
std::array< float, 4 > fClearColor