Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1136)

Unified Diff: src/gpu/GrProgramElement.cpp

Issue 612293003: Fix ref cnt'ing issue in GrProgramElement. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrProgramElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProgramElement.cpp
diff --git a/src/gpu/GrProgramElement.cpp b/src/gpu/GrProgramElement.cpp
index 2c3085f7e4bbfc39df39e30b1b6e67af5f988650..89d53e28db147d98289170b929570167314bb984 100644
--- a/src/gpu/GrProgramElement.cpp
+++ b/src/gpu/GrProgramElement.cpp
@@ -31,9 +31,7 @@ void GrProgramElement::convertRefToPendingExecution() const {
++fPendingExecutions;
this->unref();
if (0 == fRefCnt) {
- for (int i = 0; i < fGpuResources.count(); ++i) {
- fGpuResources[i]->removeRef();
- }
+ this->removeRefs();
}
}
@@ -53,3 +51,9 @@ void GrProgramElement::completedExecution() const {
}
}
}
+
+void GrProgramElement::removeRefs() const {
+ for (int i = 0; i < fGpuResources.count(); ++i) {
+ fGpuResources[i]->removeRef();
+ }
+}
« no previous file with comments | « include/gpu/GrProgramElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698