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

Unified Diff: src/gpu/GrProgramElement.cpp

Issue 543833002: Add method to GrProgramResource to record that pending a execution was completed. (Closed) Base URL: https://skia.googlesource.com/skia.git@progelem
Patch Set: rebase Created 6 years, 3 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/GrProgramResource.h ('k') | src/gpu/GrProgramResource.cpp » ('j') | 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 e14a85b5f4c763f46a09470dd810ff06b4d6f921..70d5339e902e81a5baf5d8a84dd1af96824dc507 100644
--- a/src/gpu/GrProgramElement.cpp
+++ b/src/gpu/GrProgramElement.cpp
@@ -5,7 +5,6 @@
* found in the LICENSE file.
*/
-
#include "GrProgramElement.h"
#include "GrProgramResource.h"
@@ -28,3 +27,20 @@ void GrProgramElement::convertRefToPendingExecution() const {
}
}
}
+
+void GrProgramElement::completedExecution() const {
+ this->validate();
+ --fPendingExecutions;
+ if (0 == fPendingExecutions) {
+ if (0 == fRefCnt) {
+ SkDELETE(this);
+ } else {
+ // Now our pending executions have ocurred and we still have refs. Convert
+ // ownership of our resources back to regular refs.
+ for (int i = 0; i < fProgramResources.count(); ++i) {
+ fProgramResources[i]->pendingIOComplete();
+ }
+
+ }
+ }
+}
« no previous file with comments | « include/gpu/GrProgramResource.h ('k') | src/gpu/GrProgramResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698