Skip to content

Commit

Permalink
Bug 915487 - Error handling for GonkDisplayJB. r=mwu
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Lin committed Sep 12, 2013
1 parent 8457407 commit 550cdda
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions widget/gonk/libdisplay/GonkDisplayJB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ GonkDisplayJB::GonkDisplayJB()
ALOGW_IF(err, "could not open framebuffer");
}

if (!err) {
if (!err && mFBDevice) {
mWidth = mFBDevice->width;
mHeight = mFBDevice->height;
xdpi = mFBDevice->xdpi;
mHeight = mFBDevice->height;
xdpi = mFBDevice->xdpi;
/* The emulator actually reports RGBA_8888, but EGL doesn't return
* any matching configuration. We force RGBX here to fix it. */
surfaceformat = HAL_PIXEL_FORMAT_RGBX_8888;
Expand Down Expand Up @@ -116,7 +116,10 @@ GonkDisplayJB::GonkDisplayJB()

status_t error;
mBootAnimBuffer = mAlloc->createGraphicBuffer(mWidth, mHeight, surfaceformat, GRALLOC_USAGE_HW_FB | GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_COMPOSER, &error);
StartBootAnimation();
if (error == NO_ERROR && mBootAnimBuffer.get())
StartBootAnimation();
else
ALOGW("Couldn't show bootanimation (%s)", strerror(-error));
}

GonkDisplayJB::~GonkDisplayJB()
Expand Down

0 comments on commit 550cdda

Please sign in to comment.