summaryrefslogtreecommitdiff
path: root/rsProgramRaster.cpp
diff options
context:
space:
mode:
authorChris Wailes <chriswailes@google.com>2014-07-28 16:54:38 -0700
committerChris Wailes <chriswailes@google.com>2014-08-18 15:12:32 -0700
commit93d6bc872b7d9fba63abfa7513d56b38d9c3d371 (patch)
tree0a99fbd58c3254f82ffa1600f653aeac81c55d03 /rsProgramRaster.cpp
parent70d4971878444fe7cf4263998b0c3f46e2b6c71f (diff)
Replaced android::Vector with std::vector.
Change-Id: I4c6abd964dc4b1412ec2e592fc8e835fecfe53f6
Diffstat (limited to 'rsProgramRaster.cpp')
-rw-r--r--rsProgramRaster.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/rsProgramRaster.cpp b/rsProgramRaster.cpp
index 4f27f2ec..d2d06027 100644
--- a/rsProgramRaster.cpp
+++ b/rsProgramRaster.cpp
@@ -31,10 +31,14 @@ ProgramRaster::ProgramRaster(Context *rsc, bool pointSprite, RsCullMode cull)
}
void ProgramRaster::preDestroy() const {
- for (uint32_t ct = 0; ct < mRSC->mStateRaster.mRasterPrograms.size(); ct++) {
- if (mRSC->mStateRaster.mRasterPrograms[ct] == this) {
- mRSC->mStateRaster.mRasterPrograms.removeAt(ct);
- break;
+ auto &rasters = mRSC->mStateRaster.mRasterPrograms;
+
+ for (auto prIter = rasters.begin(), endIter = rasters.end();
+ prIter != endIter; prIter++) {
+
+ if (this == *prIter) {
+ rasters.erase(prIter);
+ return;
}
}
}
@@ -94,7 +98,7 @@ ObjectBaseRef<ProgramRaster> ProgramRaster::getProgramRaster(Context *rsc,
returnRef.set(pr);
ObjectBase::asyncLock();
- rsc->mStateRaster.mRasterPrograms.push(pr);
+ rsc->mStateRaster.mRasterPrograms.push_back(pr);
ObjectBase::asyncUnlock();
return returnRef;
@@ -111,4 +115,3 @@ RsProgramRaster rsi_ProgramRasterCreate(Context * rsc, bool pointSprite, RsCullM
}
}
-