Last Comment Bug 672574 - When GL Layers enabled, restarting Fennec causes black screen
: When GL Layers enabled, restarting Fennec causes black screen
Status: RESOLVED FIXED
review-needed
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: unspecified
: ARM Android
: -- normal (vote)
: ---
Assigned To: Ali Juma [:ajuma]
:
Mentors:
Depends on:
Blocks: opengl-mobile
  Show dependency treegraph
 
Reported: 2011-07-19 11:18 PDT by Ali Juma [:ajuma]
Modified: 2011-09-27 09:49 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Check return value of GLContext::RenewSurface(), and re-draw after the first GeckoSurfaceView::surfaceChanged following a restart (6.12 KB, patch)
2011-07-19 11:21 PDT, Ali Juma [:ajuma]
no flags Details | Diff | Review

Description Ali Juma [:ajuma] 2011-07-19 11:18:54 PDT
As noted in the comments of bug 660072, when GL Layers are enabled on Android, pressing 'back' to return to the home screen and then pressing the Fennec icon again leads to a completely black window. 

There seem to be two issues here (when testing on a Nexus S):
1) After a restart, the first call to GLContext::RenewSurface() almost always fails, but the return value isn't currently checked. 
2) After a restart, a GeckoSurfaceView::surfaceChanged event occurs, but no drawing is initiated.
Comment 1 Ali Juma [:ajuma] 2011-07-19 11:21:14 PDT
Created attachment 546837 [details] [diff] [review]
Check return value of GLContext::RenewSurface(), and re-draw after the first GeckoSurfaceView::surfaceChanged following a restart
Comment 2 Ali Juma [:ajuma] 2011-07-27 08:26:23 PDT
Comment on attachment 546837 [details] [diff] [review]
Check return value of GLContext::RenewSurface(), and re-draw after the first GeckoSurfaceView::surfaceChanged following a restart

I'm working on trying to better understand why GLContext::RenewSurface() is failing following a restart. 

The failures are coming from fMakeCurrent, which is producing an EGL_BAD_ALLOC error.

Discussing with BenWa, it seems we might need to explicitly destroy the GLContext when the activity pauses (and reconstruct on resume).
Comment 3 Ali Juma [:ajuma] 2011-08-29 06:39:54 PDT
> I'm working on trying to better understand why GLContext::RenewSurface() is
> failing following a restart. 

This turned out to have the same underlying cause as Bug 677290 (we weren't releasing the GL surface when the Android surface was destroyed), so the patches for that bug also fixed this one.
Comment 4 Ali Juma [:ajuma] 2011-08-29 06:41:13 PDT
(In reply to Ali Juma [:ajuma] from comment #3)
 
> This turned out to have the same underlying cause as Bug 677290 

That should be Bug 677920.

Note You need to log in before you can comment on or make changes to this bug.