SurfaceFlinger: fix a couple NULL fence checks
This change replaces checks for a NULL fence pointer with calls to Fence::isValid. There should no longer be NULL fences. Change-Id: If17c9c132fcb1801531bf7588f8ba53476c57dad
This commit is contained in:
parent
f5c7cb316c
commit
9ef9d51ec9
@ -526,7 +526,7 @@ void Layer::onPostComposition() {
|
||||
mFrameTracker.setDesiredPresentTime(desiredPresentTime);
|
||||
|
||||
sp<Fence> frameReadyFence = mSurfaceFlingerConsumer->getCurrentFence();
|
||||
if (frameReadyFence != NULL) {
|
||||
if (frameReadyFence->isValid()) {
|
||||
mFrameTracker.setFrameReadyFence(frameReadyFence);
|
||||
} else {
|
||||
// There was no fence for this frame, so assume that it was ready
|
||||
@ -536,7 +536,7 @@ void Layer::onPostComposition() {
|
||||
|
||||
const HWComposer& hwc = mFlinger->getHwComposer();
|
||||
sp<Fence> presentFence = hwc.getDisplayFence(HWC_DISPLAY_PRIMARY);
|
||||
if (presentFence != NULL) {
|
||||
if (presentFence->isValid()) {
|
||||
mFrameTracker.setActualPresentFence(presentFence);
|
||||
} else {
|
||||
// The HWC doesn't support present fences, so use the refresh
|
||||
|
Loading…
Reference in New Issue
Block a user