Fix reduceOpsTaskSplitting + image_from_yuv_textures

SkTHashMap->remove does not like if you try to remove
an entry that isn't in there. In that case, we don't
want to do anything.

Bug: skia:10877
Change-Id: Ib87aac7a132c78915ec18724f847c44c2c3efa80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360596
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This commit is contained in:
Adlai Holler 2021-01-27 11:06:52 -05:00 committed by Skia Commit-Bot
parent dd9449c23b
commit 9202ebc7ad

View File

@ -72,7 +72,9 @@ static bool task_cluster_visit(GrRenderTask* task, SkTInternalLList<GrRenderTask
// Tasks with 0 or multiple targets are treated as full barriers
// for all their targets.
for (int j = 0; j < task->numTargets(); j++) {
lastTaskMap->remove(task->target(0));
if (lastTaskMap->find(task->target(0))) {
lastTaskMap->remove(task->target(0));
}
}
return false;
}