Flutter Engine
The Flutter Engine
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
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;
43 bool onBindTextures(const GrGeometryProcessor&,
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:56
GrLoadOp
Definition: GrTypesPriv.h:155
GrSurfaceOrigin
Definition: GrTypes.h:147
void inlineUpload(GrOpFlushState *state, GrDeferredTextureUploadFn &upload) override
bool set(GrRenderTarget *, GrSurfaceOrigin, const SkIRect &bounds, const GrOpsRenderPass::LoadAndStoreInfo &, const GrOpsRenderPass::StencilLoadAndStoreInfo &, const skia_private::TArray< GrSurfaceProxy *, true > &sampledProxies)
GrD3DOpsRenderPass(GrD3DGpu *)
void onExecuteDrawable(std::unique_ptr< SkDrawable::GpuDrawHandler >) override
Definition: GrGpu.h:62
DlColor color
AtkStateType state
Optional< SkRect > bounds
Definition: SkRecords.h:189
Definition: upload.py:1
SeparatedVector2 offset
Definition: SkRect.h:32