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>
diff --git a/src/gpu/GrRenderTaskCluster.cpp b/src/gpu/GrRenderTaskCluster.cpp
index 676ec49..83f585f 100644
--- a/src/gpu/GrRenderTaskCluster.cpp
+++ b/src/gpu/GrRenderTaskCluster.cpp
@@ -72,7 +72,9 @@
// 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;
}