summaryrefslogtreecommitdiff
path: root/libs/rs/rsFBOCache.cpp
diff options
context:
space:
mode:
author Alex Sakhartchouk <alexst@google.com> 2011-10-18 10:54:29 -0700
committer Alex Sakhartchouk <alexst@google.com> 2011-10-18 10:54:29 -0700
commit5ef2f53a00f64b7e156978d9de2e097394e4036a (patch)
treefdac496264e25719720de129c41304515f0237af /libs/rs/rsFBOCache.cpp
parenta744ead977b2beda89091abf295bcda860bf88b2 (diff)
Remove ObjBaseRef from the hal struct
Change-Id: Idcac14ecfdd4d06a0f54bf50e3b9657be62e6638
Diffstat (limited to 'libs/rs/rsFBOCache.cpp')
-rw-r--r--libs/rs/rsFBOCache.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/libs/rs/rsFBOCache.cpp b/libs/rs/rsFBOCache.cpp
index c5c64c27b602..f4a8bc6d7b30 100644
--- a/libs/rs/rsFBOCache.cpp
+++ b/libs/rs/rsFBOCache.cpp
@@ -26,11 +26,14 @@ using namespace android::renderscript;
FBOCache::FBOCache() {
mDirty = true;
mHal.state.colorTargetsCount = 1;
- mHal.state.colorTargets = new ObjectBaseRef<Allocation>[mHal.state.colorTargetsCount];
+ mHal.state.colorTargets = new Allocation*[mHal.state.colorTargetsCount];
+ mColorTargets = new ObjectBaseRef<Allocation>[mHal.state.colorTargetsCount];
+ resetAll(NULL);
}
FBOCache::~FBOCache() {
delete[] mHal.state.colorTargets;
+ delete[] mColorTargets;
}
void FBOCache::init(Context *rsc) {
@@ -52,7 +55,8 @@ void FBOCache::bindColorTarget(Context *rsc, Allocation *a, uint32_t slot) {
return;
}
}
- mHal.state.colorTargets[slot].set(a);
+ mColorTargets[slot].set(a);
+ mHal.state.colorTargets[slot] = a;
mDirty = true;
}
@@ -63,15 +67,18 @@ void FBOCache::bindDepthTarget(Context *rsc, Allocation *a) {
return;
}
}
- mHal.state.depthTarget.set(a);
+ mDepthTarget.set(a);
+ mHal.state.depthTarget = a;
mDirty = true;
}
void FBOCache::resetAll(Context *) {
for (uint32_t i = 0; i < mHal.state.colorTargetsCount; i ++) {
- mHal.state.colorTargets[i].set(NULL);
+ mColorTargets[i].set(NULL);
+ mHal.state.colorTargets[i] = NULL;
}
- mHal.state.depthTarget.set(NULL);
+ mDepthTarget.set(NULL);
+ mHal.state.depthTarget = NULL;
mDirty = true;
}