Bug 1160877 - Fix gonkDisplay stop anim condition. r=mwu, a=me

--HG--
extra : rebase_source : c17fb0a0650827dc2fc7ae811642387a4b86a85a
This commit is contained in:
JerryShih 2015-05-05 10:32:00 -04:00
Родитель 9c1044ef66
Коммит 354bd0ccdd
2 изменённых файлов: 16 добавлений и 11 удалений

Просмотреть файл

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

Просмотреть файл

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