Make GrRenderTargetOpList::purgeOpsWithUninstantiatedProxies match the GrTextureOpList version

This should fix the TSAN bug:

5.17m	    /b/s/w/ir/build/dm(_ZN14GrOpMemoryPool7releaseENSt3__110unique_ptrI4GrOpNS0_14default_deleteIS2_EEEE+0x40) [0x1ba6b40]
build/dm GrOpMemoryPool::release(std::__1::unique_ptr >) at src/gpu/GrMemoryPool.cpp:24
5.17m	    /b/s/w/ir/build/dm(_ZN20GrRenderTargetOpList33purgeOpsWithUninstantiatedProxiesEv+0x238) [0x1bd65f8]
build/dm std::__1::unique_ptr >::reset(GrOp*) at include/c++/v1/memory:2595

Change-Id: I3788dd68993ae86f3c316be9bcbaa1f15abdfbf3
Reviewed-on: https://skia-review.googlesource.com/141242
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2018-07-13 11:44:53 -04:00 committed by Skia Commit-Bot
parent 4c3b824874
commit ed1205ae20

View File

@ -269,7 +269,9 @@ void GrRenderTargetOpList::purgeOpsWithUninstantiatedProxies() {
};
for (RecordedOp& recordedOp : fRecordedOps) {
hasUninstantiatedProxy = false;
recordedOp.visitProxies(checkInstantiation);
if (recordedOp.fOp) {
recordedOp.visitProxies(checkInstantiation);
}
if (hasUninstantiatedProxy) {
// When instantiation of the proxy fails we drop the Op
recordedOp.deleteOp(fOpMemoryPool.get());