Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1160877 - Fix gonkDisplay stop anim condition. r=mwu, a=me
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryShih committed May 5, 2015
1 parent 7499ec8 commit d59ebed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
25 changes: 14 additions & 11 deletions widget/gonk/libdisplay/GonkDisplayJB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ GonkDisplayJB::~GonkDisplayJB()
ANativeWindow*
GonkDisplayJB::GetNativeWindow()
{
if (!mBootAnimBuffer.get()) {
StopBootAnimation();
}
StopBootAnim();

return mSTClient.get();
}

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}

Expand All @@ -356,6 +350,15 @@ GonkDisplayJB::GetPrevDispAcquireFd()
return mDispSurface->GetPrevDispAcquireFd();
}

void
GonkDisplayJB::StopBootAnim()
{
StopBootAnimation();
if (mBootAnimBuffer.get()) {
mBootAnimBuffer = nullptr;
}
}

__attribute__ ((visibility ("default")))
GonkDisplay*
GetGonkDisplay()
Expand Down
2 changes: 2 additions & 0 deletions widget/gonk/libdisplay/GonkDisplayJB.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class MOZ_EXPORT GonkDisplayJB : public GonkDisplay {
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;
Expand Down

0 comments on commit d59ebed

Please sign in to comment.