127 {
128 AutoDeinstantiateTextureProxy autoDeinstantiateTargetProxy(
129 fRecording->fTargetProxyData ? fRecording->fTargetProxyData->lazyProxy() : nullptr);
130
131 const Texture* replayTarget = nullptr;
134 if (fRecording->fTargetProxyData) {
135 if (!targetSurface) {
136 SKGPU_LOG_E(
"No surface provided to instantiate target texture proxy.");
137 return false;
138 }
139 TextureProxy* surfaceTexture = targetSurface->backingTextureProxy();
140 if (!surfaceTexture->instantiate(resourceProvider)) {
141 SKGPU_LOG_E(
"Could not instantiate target texture proxy.");
142 return false;
143 }
144 if (!fRecording->fTargetProxyData->lazyInstantiate(resourceProvider,
145 surfaceTexture->refTexture())) {
146 SKGPU_LOG_E(
"Could not instantiate deferred texture proxy.");
147 return false;
148 }
149 replayTarget = surfaceTexture->texture();
150 }
151
152 for (
size_t i = 0;
i < fRecording->fExtraResourceRefs.size(); ++
i) {
153 commandBuffer->trackResource(fRecording->fExtraResourceRefs[
i]);
154 }
155
156
157
158
159 if (fRecording->fRootTaskList->addCommands(
161 return false;
162 }
163 for (
int i = 0;
i < fRecording->fFinishedProcs.size(); ++
i) {
164 commandBuffer->addFinishedProc(std::move(fRecording->fFinishedProcs[
i]));
165 }
166 fRecording->fFinishedProcs.clear();
167
168 return true;
169}
#define SKGPU_LOG_E(fmt,...)
static constexpr bool SkToBool(const T &x)