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

Unified Diff: src/gpu/GrProcessor.cpp

Issue 1307223004: Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix misresolve Created 5 years, 4 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 | « src/gpu/GrProcOptInfo.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProcessor.cpp
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index db1e2d9f6198a0103c08728a8326b6dbf9ef5df3..3cbf777253ddf4f2d543338f330647ddaedb4353 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -130,6 +130,12 @@ bool GrProcessor::hasSameTextureAccesses(const GrProcessor& that) const {
///////////////////////////////////////////////////////////////////////////////////////////////////
+GrFragmentProcessor::~GrFragmentProcessor() {
+ for (int i = 0; i < fChildProcessors.count(); ++i) {
+ fChildProcessors[i]->unref();
+ }
+}
+
bool GrFragmentProcessor::isEqual(const GrFragmentProcessor& that,
bool ignoreCoordTransforms) const {
if (this->classID() != that.classID() ||
@@ -161,7 +167,7 @@ GrGLFragmentProcessor* GrFragmentProcessor::createGLInstance() const {
GrGLFragmentProcessor* glFragProc = this->onCreateGLInstance();
glFragProc->fChildProcessors.push_back_n(fChildProcessors.count());
for (int i = 0; i < fChildProcessors.count(); ++i) {
- glFragProc->fChildProcessors[i] = fChildProcessors[i].processor()->createGLInstance();
+ glFragProc->fChildProcessors[i] = fChildProcessors[i]->createGLInstance();
}
return glFragProc;
}
@@ -199,7 +205,7 @@ int GrFragmentProcessor::registerChildProcessor(const GrFragmentProcessor* child
}
int index = fChildProcessors.count();
- fChildProcessors.push_back(GrFragmentStage(child));
+ fChildProcessors.push_back(SkRef(child));
if (child->willReadFragmentPosition()) {
this->setWillReadFragmentPosition();
« no previous file with comments | « src/gpu/GrProcOptInfo.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698