am 789a6c3f
: SurfaceFlinger: fix a couple NULL fence checks
* commit '789a6c3f1dfe22a1ffea7f39b2098d7842cd1f30': SurfaceFlinger: fix a couple NULL fence checks
This commit is contained in:
commit
6c6d1fd07b
@ -526,7 +526,7 @@ void Layer::onPostComposition() {
|
|||||||
mFrameTracker.setDesiredPresentTime(desiredPresentTime);
|
mFrameTracker.setDesiredPresentTime(desiredPresentTime);
|
||||||
|
|
||||||
sp<Fence> frameReadyFence = mSurfaceFlingerConsumer->getCurrentFence();
|
sp<Fence> frameReadyFence = mSurfaceFlingerConsumer->getCurrentFence();
|
||||||
if (frameReadyFence != NULL) {
|
if (frameReadyFence->isValid()) {
|
||||||
mFrameTracker.setFrameReadyFence(frameReadyFence);
|
mFrameTracker.setFrameReadyFence(frameReadyFence);
|
||||||
} else {
|
} else {
|
||||||
// There was no fence for this frame, so assume that it was ready
|
// 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();
|
const HWComposer& hwc = mFlinger->getHwComposer();
|
||||||
sp<Fence> presentFence = hwc.getDisplayFence(HWC_DISPLAY_PRIMARY);
|
sp<Fence> presentFence = hwc.getDisplayFence(HWC_DISPLAY_PRIMARY);
|
||||||
if (presentFence != NULL) {
|
if (presentFence->isValid()) {
|
||||||
mFrameTracker.setActualPresentFence(presentFence);
|
mFrameTracker.setActualPresentFence(presentFence);
|
||||||
} else {
|
} else {
|
||||||
// The HWC doesn't support present fences, so use the refresh
|
// The HWC doesn't support present fences, so use the refresh
|
||||||
|
Loading…
Reference in New Issue
Block a user