Bug 1160877 - fix gonkDisplay stop anim condition. r=mwu

This commit is contained in:
JerryShih 2015-05-05 10:32:00 +02:00
parent 2d7db65468
commit 3d5cfffb8c
2 changed files with 16 additions and 11 deletions

View File

@ -167,9 +167,8 @@ GonkDisplayJB::~GonkDisplayJB()
ANativeWindow*
GonkDisplayJB::GetNativeWindow()
{
if (!mBootAnimBuffer.get()) {
StopBootAnimation();
}
StopBootAnim();
return mSTClient.get();
}
@ -235,10 +234,7 @@ GonkDisplayJB::GetDispSurface()
bool
GonkDisplayJB::SwapBuffers(EGLDisplay dpy, EGLSurface sur)
{
if (mBootAnimBuffer.get()) {
StopBootAnimation();
mBootAnimBuffer = nullptr;
}
StopBootAnim();
// Should be called when composition rendering is complete for a frame.
// Only HWC v1.0 needs this call.
@ -337,10 +333,8 @@ GonkDisplayJB::QueueBuffer(ANativeWindowBuffer* buf)
void
GonkDisplayJB::UpdateDispSurface(EGLDisplay dpy, EGLSurface sur)
{
if (mBootAnimBuffer.get()) {
StopBootAnimation();
mBootAnimBuffer = nullptr;
}
StopBootAnim();
eglSwapBuffers(dpy, sur);
}
@ -356,6 +350,15 @@ GonkDisplayJB::GetPrevDispAcquireFd()
return mDispSurface->GetPrevDispAcquireFd();
}
void
GonkDisplayJB::StopBootAnim()
{
if (mBootAnimBuffer.get()) {
mBootAnimBuffer = nullptr;
}
StopBootAnimation();
}
__attribute__ ((visibility ("default")))
GonkDisplay*
GetGonkDisplay()

View File

@ -55,6 +55,8 @@ public:
bool Post(buffer_handle_t buf, int fence);
private:
void StopBootAnim();
hw_module_t const* mModule;
hw_module_t const* mFBModule;
hwc_composer_device_1_t* mHwc;