Bug 1123553 - Fix -Wuninitialized warning in GonkDisplayJB.cpp by removing unnecessary error check. r=mwu

This commit is contained in:
Chris Peterson 2015-01-19 21:44:27 -08:00
parent 6e8135dbde
commit 3de239df52

View File

@ -105,7 +105,6 @@ GonkDisplayJB::GonkDisplayJB()
mAlloc = new GraphicBufferAlloc();
status_t error;
#if ANDROID_VERSION >= 21
sp<IGraphicBufferProducer> producer;
sp<IGraphicBufferConsumer> consumer;
@ -119,6 +118,7 @@ GonkDisplayJB::GonkDisplayJB()
#else
sp<BufferQueue> consumer = new BufferQueue(true, mAlloc);
#endif
mFBSurface = new FramebufferSurface(0, mWidth, mHeight, surfaceformat, consumer);
#if ANDROID_VERSION == 17
@ -127,6 +127,7 @@ GonkDisplayJB::GonkDisplayJB()
#else
sp<Surface> stc = new Surface(producer);
#endif
mSTClient = stc;
mSTClient->perform(mSTClient.get(), NATIVE_WINDOW_SET_BUFFER_COUNT, 2);
mSTClient->perform(mSTClient.get(), NATIVE_WINDOW_SET_USAGE,
@ -138,11 +139,8 @@ GonkDisplayJB::GonkDisplayJB()
if (mHwc)
mHwc->blank(mHwc, HWC_DISPLAY_PRIMARY, 0);
if (error == NO_ERROR) {
ALOGI("Starting bootanimation with (%d) format framebuffer", surfaceformat);
StartBootAnimation();
} else
ALOGW("Couldn't show bootanimation (%s)", strerror(-error));
ALOGI("Starting bootanimation with (%d) format framebuffer", surfaceformat);
StartBootAnimation();
}
GonkDisplayJB::~GonkDisplayJB()