81 {
82
83
84
85
86
87
88
89 SkASSERT(fTarget && fTarget->isInstantiated());
90
91 if (fTarget->texture() == replayData.fTarget) {
92 commandBuffer->setReplayTranslation(replayData.fTranslation);
93 } else {
94 commandBuffer->clearReplayTranslation();
95 }
96
97
98
103 SkASSERT(fTarget->numSamples() == 1 &&
105 colorAttachment = resourceProvider->findOrCreateDiscardableMSAAAttachment(
107 if (!colorAttachment) {
108 SKGPU_LOG_W(
"Could not get Color attachment for RenderPassTask");
110 }
111 resolveAttachment = fTarget->refTexture();
112 } else {
113 colorAttachment = fTarget->refTexture();
114 }
115
118
119 SkASSERT(fTarget->isInstantiated());
120 SkISize dimensions = context->priv().caps()->getDepthAttachmentDimensions(
121 fTarget->texture()->textureInfo(), fTarget->dimensions());
122 depthStencilAttachment = resourceProvider->findOrCreateDepthStencilAttachment(
124 if (!depthStencilAttachment) {
125 SKGPU_LOG_W(
"Could not get DepthStencil attachment for RenderPassTask");
127 }
128 }
129
130
131
132
133 if (commandBuffer->addRenderPass(fRenderPassDesc,
134 std::move(colorAttachment),
135 std::move(resolveAttachment),
136 std::move(depthStencilAttachment),
138 fDrawPasses)) {
140 } else {
142 }
143}
#define SKGPU_LOG_W(fmt,...)
uint32_t numSamples() const
static SkRect Make(const SkISize &size)
AttachmentDesc fDepthStencilAttachment
AttachmentDesc fColorResolveAttachment
AttachmentDesc fColorAttachment