Lines Matching defs:task
120 bool used = std::any_of(fDAG.begin(), fDAG.end(), [&](auto& task) {
121 return task && task->isUsed(proxy);
170 for (const auto& task : fDAG) {
171 if (task) {
172 task->gatherIDs(&fFlushingRenderTaskIDs);
218 for (const auto& task : fDAG) {
219 SkDEBUGCODE(task->dump(/* printDependencies */ true);)
225 for (const auto& task : fDAG) {
226 SkASSERT(task);
227 task->gatherProxyIntervals(&resourceAllocator);
277 label.printf("task %d/%d", i, fDAG.count());
349 for (const auto& task : fDAG) {
350 SkASSERT(task);
351 if (!task->unique() || task->requiresExplicitCleanup()) {
355 task->endFlush(this);
357 task->disown(this);
369 SkDEBUGFAIL("Render task topo sort failed.");
413 for (GrRenderTask* task : llist) {
414 task->gatherProxyIntervals(resourceAllocator);
429 sk_sp<GrRenderTask>& task = fDAG[i];
431 if (auto opsTask = task->asOpsTask()) {
441 fDAG[newCount++] = std::move(task);
448 for (auto& task : fDAG) {
449 if (task) {
450 task->makeClosed(fContext);
455 GrRenderTask* GrDrawingManager::insertTaskBeforeLast(sk_sp<GrRenderTask> task) {
456 if (!task) {
460 return fDAG.push_back(std::move(task)).get();
467 return (fDAG[fDAG.count() - 2] = std::move(task)).get();
470 GrRenderTask* GrDrawingManager::appendTask(sk_sp<GrRenderTask> task) {
471 if (!task) {
474 return fDAG.push_back(std::move(task)).get();
559 void GrDrawingManager::setLastRenderTask(const GrSurfaceProxy* proxy, GrRenderTask* task) {
562 SkASSERT(prior->isClosed() || prior == task);
566 if (task) {
567 fLastRenderTasks.set(key, task);
579 GrRenderTask* task = this->getLastRenderTask(proxy);
580 return task ? task->asOpsTask() : nullptr;
641 // Add a task to handle drawing and lifetime management of the DDL.
760 // the mipmapped version of 'proxy', they will then come to depend on the render task being
764 // sorting/opsTask-splitting-reduction mode) because it will depend upon this resolve task.
766 GrRenderTask* task = this->insertTaskBeforeLast(sk_make_sp<GrTextureResolveRenderTask>());
767 return static_cast<GrTextureResolveRenderTask*>(task);
787 // Additionally we would've had to temporarily set the wait task as the lastRenderTask
802 // to the DAG. Since it is the last task now we call setLastRenderTask on the proxy. If
803 // there is a lastTask on the proxy we make waitTask depend on that task. This
828 GrRenderTask* task = this->appendTask(sk_make_sp<GrTransferFromRenderTask>(
836 task->addDependency(this, srcProxy.get(), GrMipmapped::kNo,
838 task->makeClosed(fContext);
855 // "active ops task" tracking. dst will be the target of our copy task but it might also be the
856 // target of the active ops task. We currently require the active ops task to be closed before
857 // making a new task that targets the same proxy. However, if we first close the active ops
858 // task, then fail to make a copy task, the next active ops task may target the same proxy. This
859 // will trip an assert related to unnecessary ops task splitting.
866 sk_sp<GrRenderTask> task = GrCopyRenderTask::Make(this,
872 if (!task) {
876 this->appendTask(task);
881 task->addDependency(this, src.get(), GrMipmapped::kNo, GrTextureResolveManager(this), caps);
882 task->makeClosed(fContext);
888 return task;
912 GrRenderTask* task = this->appendTask(GrWritePixelsTask::Make(this,
919 if (!task) {
923 task->makeClosed(fContext);