Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrD3DOpsRenderPass.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrD3DOpsRenderPass_DEFINED
9#define GrD3DOpsRenderPass_DEFINED
10
12
13#include "include/gpu/GrTypes.h"
15
16class GrD3DGpu;
18
20public:
22
23 ~GrD3DOpsRenderPass() override;
24
26
27 void onExecuteDrawable(std::unique_ptr<SkDrawable::GpuDrawHandler>) override {}
28
29 bool set(GrRenderTarget*, GrSurfaceOrigin, const SkIRect& bounds,
33
34 void submit();
35
36private:
37 GrGpu* gpu() override;
38
39 void onBegin() override;
40
41 bool onBindPipeline(const GrProgramInfo&, const SkRect& drawBounds) override;
42 void onSetScissorRect(const SkIRect&) override;
44 const GrSurfaceProxy* const geomProcTextures[],
45 const GrPipeline&) override;
46 void onBindBuffers(sk_sp<const GrBuffer> indexBuffer, sk_sp<const GrBuffer> instanceBuffer,
47 sk_sp<const GrBuffer> vertexBuffer, GrPrimitiveRestart) override;
48 void onDraw(int vertexCount, int baseVertex) override {
49 this->onDrawInstanced(1, 0, vertexCount, baseVertex);
50 }
51 void onDrawIndexed(int indexCount, int baseIndex, uint16_t minIndexValue,
52 uint16_t maxIndexValue, int baseVertex) override {
53 this->onDrawIndexedInstanced(indexCount, baseIndex, 1, 0, baseVertex);
54 }
55 void onDrawInstanced(int instanceCount, int baseInstance, int vertexCount,
56 int baseVertex) override;
57 void onDrawIndexedInstanced(int indexCount, int baseIndex, int instanceCount, int baseInstance,
58 int baseVertex) override;
59 void onDrawIndirect(const GrBuffer*, size_t offset, int drawCount) override;
60 void onDrawIndexedIndirect(const GrBuffer*, size_t offset, int drawCount) override;
61
62 void onClear(const GrScissorState& scissor, std::array<float, 4> color) override;
63
64 void onClearStencilClip(const GrScissorState& scissor, bool insideStencilMask) override;
65
66 GrD3DGpu* fGpu;
67
68 GrD3DPipelineState* fCurrentPipelineState = nullptr;
69
70 SkIRect fBounds;
71 SkIRect fCurrentPipelineBounds;
72
73 GrLoadOp fColorLoadOp;
74 std::array<float, 4> fClearColor;
75 GrLoadOp fStencilLoadOp;
76
77 using INHERITED = GrOpsRenderPass;
78};
79
80#endif
std::function< void(GrDeferredTextureUploadWritePixelsFn &)> GrDeferredTextureUploadFn
GrPrimitiveRestart
Definition GrTypesPriv.h:55
GrLoadOp
GrSurfaceOrigin
Definition GrTypes.h:147
SkColor4f color
void onClear(const GrScissorState &scissor, std::array< float, 4 > color) override
void inlineUpload(GrOpFlushState *state, GrDeferredTextureUploadFn &upload) override
GrGpu * gpu() override
void onClearStencilClip(const GrScissorState &scissor, bool insideStencilMask) override
bool onBindPipeline(const GrProgramInfo &, const SkRect &drawBounds) override
void onDraw(int vertexCount, int baseVertex) override
void onDrawIndirect(const GrBuffer *, size_t offset, int drawCount) override
void onDrawIndexed(int indexCount, int baseIndex, uint16_t minIndexValue, uint16_t maxIndexValue, int baseVertex) override
void onDrawIndexedInstanced(int indexCount, int baseIndex, int instanceCount, int baseInstance, int baseVertex) override
void onDrawInstanced(int instanceCount, int baseInstance, int vertexCount, int baseVertex) override
bool onBindTextures(const GrGeometryProcessor &, const GrSurfaceProxy *const geomProcTextures[], const GrPipeline &) override
void onBindBuffers(sk_sp< const GrBuffer > indexBuffer, sk_sp< const GrBuffer > instanceBuffer, sk_sp< const GrBuffer > vertexBuffer, GrPrimitiveRestart) override
void onDrawIndexedIndirect(const GrBuffer *, size_t offset, int drawCount) override
void onSetScissorRect(const SkIRect &) override
void onExecuteDrawable(std::unique_ptr< SkDrawable::GpuDrawHandler >) override
Definition GrGpu.h:62
AtkStateType state
Point offset