summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceControl.cpp
diff options
context:
space:
mode:
author Yi Kong <yikong@google.com> 2018-06-07 17:19:59 -0700
committer android-build-merger <android-build-merger@google.com> 2018-06-07 17:19:59 -0700
commit83af600986a41b38213e798bba8ea89ad0523096 (patch)
tree627f17cbd47a952696913884b21d100cc15c855b /libs/gui/SurfaceControl.cpp
parent693e05d21ae6999a8ebfe149eaaa07366d69396a (diff)
parenta160f5a70ffba3715c8a92f4f469922d59635356 (diff)
Merge "Replace NULL/0 with nullptr"
am: a160f5a70f Change-Id: I298ccea470e3bc6bed3fcf6e3e03a2f0d720ff7e
Diffstat (limited to 'libs/gui/SurfaceControl.cpp')
-rw-r--r--libs/gui/SurfaceControl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index 58bd273de6..08e3b60f6c 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -83,7 +83,7 @@ void SurfaceControl::clear()
}
void SurfaceControl::disconnect() {
- if (mGraphicBufferProducer != NULL) {
+ if (mGraphicBufferProducer != nullptr) {
mGraphicBufferProducer->disconnect(
BufferQueueCore::CURRENTLY_CONNECTED_API);
}
@@ -92,7 +92,7 @@ void SurfaceControl::disconnect() {
bool SurfaceControl::isSameSurface(
const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs)
{
- if (lhs == 0 || rhs == 0)
+ if (lhs == nullptr || rhs == nullptr)
return false;
return lhs->mHandle == rhs->mHandle;
}
@@ -219,7 +219,7 @@ status_t SurfaceControl::getLayerFrameStats(FrameStats* outStats) const {
status_t SurfaceControl::validate() const
{
- if (mHandle==0 || mClient==0) {
+ if (mHandle==nullptr || mClient==nullptr) {
ALOGE("invalid handle (%p) or client (%p)",
mHandle.get(), mClient.get());
return NO_INIT;
@@ -231,7 +231,7 @@ status_t SurfaceControl::writeSurfaceToParcel(
const sp<SurfaceControl>& control, Parcel* parcel)
{
sp<IGraphicBufferProducer> bp;
- if (control != NULL) {
+ if (control != nullptr) {
bp = control->mGraphicBufferProducer;
}
return parcel->writeStrongBinder(IInterface::asBinder(bp));
@@ -249,7 +249,7 @@ sp<Surface> SurfaceControl::generateSurfaceLocked() const
sp<Surface> SurfaceControl::getSurface() const
{
Mutex::Autolock _l(mLock);
- if (mSurfaceData == 0) {
+ if (mSurfaceData == nullptr) {
return generateSurfaceLocked();
}
return mSurfaceData;