summaryrefslogtreecommitdiff
path: root/rsFBOCache.cpp
diff options
context:
space:
mode:
authorChris Wailes <chriswailes@google.com>2014-08-12 13:51:10 -0700
committerStephen Hines <srhines@google.com>2014-08-20 18:14:27 -0700
commit44bef6fba6244292b751387f3d6c31cca96c28ad (patch)
treea9dd48535a1f3343315bc75f7751cf042c05dc67 /rsFBOCache.cpp
parent4bb773ef75eeff5960852b733bcca5834020ee9e (diff)
downloadrs-44bef6fba6244292b751387f3d6c31cca96c28ad.tar.gz
Replace NULL macros with nullptr literals.
Change-Id: I918c40879aa547438f77e7d1a95fa2aa33bec398
Diffstat (limited to 'rsFBOCache.cpp')
-rw-r--r--rsFBOCache.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/rsFBOCache.cpp b/rsFBOCache.cpp
index 1da327fe..21852350 100644
--- a/rsFBOCache.cpp
+++ b/rsFBOCache.cpp
@@ -28,7 +28,7 @@ FBOCache::FBOCache() {
mHal.state.colorTargetsCount = 1;
mHal.state.colorTargets = new Allocation*[mHal.state.colorTargetsCount];
mColorTargets = new ObjectBaseRef<Allocation>[mHal.state.colorTargetsCount];
- resetAll(NULL);
+ resetAll(nullptr);
}
FBOCache::~FBOCache() {
@@ -49,7 +49,7 @@ void FBOCache::bindColorTarget(Context *rsc, Allocation *a, uint32_t slot) {
ALOGE("Invalid render target index");
return;
}
- if (a != NULL) {
+ if (a != nullptr) {
if (!(a->getIsTexture() || (a->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_OUTPUT))) {
ALOGE("Invalid Color Target");
return;
@@ -61,7 +61,7 @@ void FBOCache::bindColorTarget(Context *rsc, Allocation *a, uint32_t slot) {
}
void FBOCache::bindDepthTarget(Context *rsc, Allocation *a) {
- if (a != NULL) {
+ if (a != nullptr) {
if (!a->getIsRenderTarget()) {
ALOGE("Invalid Depth Target");
return;
@@ -74,11 +74,11 @@ void FBOCache::bindDepthTarget(Context *rsc, Allocation *a) {
void FBOCache::resetAll(Context *) {
for (uint32_t i = 0; i < mHal.state.colorTargetsCount; i ++) {
- mColorTargets[i].set(NULL);
- mHal.state.colorTargets[i] = NULL;
+ mColorTargets[i].set(nullptr);
+ mHal.state.colorTargets[i] = nullptr;
}
- mDepthTarget.set(NULL);
- mHal.state.depthTarget = NULL;
+ mDepthTarget.set(nullptr);
+ mHal.state.depthTarget = nullptr;
mDirty = true;
}