Closed
      
        Bug 711333
      
      
        Opened 13 years ago
          Closed 13 years ago
      
        
    
  
Race condition when moving and updating textures
Categories
(Firefox for Android Graveyard :: General, defect, P4)
Tracking
(firefox11 fixed, fennec11+)
        RESOLVED
        FIXED
        
    
  
        
            Firefox 12
        
    
  
People
(Reporter: pcwalton, Assigned: pcwalton)
References
Details
Attachments
(1 file)
| 4.64 KB,
          patch         | kats
:
              
              review+ blassey
:
              
              approval-mozilla-aurora+ | Details | Diff | Splinter Review | 
It's possible for the following chain of events to occur:
(1) GeckoSoftwareLayerClient begins a transaction on the tile layer in beginDrawing().
(2) GSLC acquires the monitor on the layer controller in updateViewport(), which is called by endDrawing().
(3) GSLC moves the tile and the viewport around.
(4) GSLC releases the monitor.
(5) The GL rendering thread acquires the monitor on the layer controller.
(6) In the process of rendering a frame, the rendering thread tries to begin a transaction but fails and continues with the old image in the new position. Now the display is corrupt for one frame.
(7) GSLC ends the transaction.
This usually shows up as one of the flashes when navigating from page to page. It corrects itself after a frame or two but is quite unsightly. The solution should be for GSLC to always hold the monitor around the transaction. Will post a patch to this effect tomorrow.
|   | Assignee | |
| Comment 1•13 years ago
           | ||
Proposed patch attached.
Assignee: nobody → pwalton
Status: NEW → ASSIGNED
        Attachment #582497 -
        Flags: review?(bugmail.mozilla)
| Comment 2•13 years ago
           | ||
Comment on attachment 582497 [details] [diff] [review]
Proposed patch.
>diff --git a/widget/src/android/AndroidGraphicBuffer.cpp b/widget/src/android/AndroidGraphicBuffer.cpp
>   bool EnsureInitialized()
>   {
>     if (mInitialized) {
>       return true;
>     }
> 
>+    return false;
>+
>     void *handle = dlopen(ANDROID_EGL_PATH, RTLD_LAZY);
Testing code? r+ assuming this hunk was included accidentally.
        Attachment #582497 -
        Flags: review?(bugmail.mozilla) → review+
|   | Assignee | |
| Comment 3•13 years ago
           | ||
(In reply to Kartikaya Gupta (:kats) from comment #2)
> Testing code? r+ assuming this hunk was included accidentally.
Actually, code needed to make my Droid X not crash (bug 711694), but good catch :)
| Updated•13 years ago
           | 
Priority: -- → P4
|   | Assignee | |
| Comment 4•13 years ago
           | ||
| Comment 5•13 years ago
           | ||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
| Updated•13 years ago
           | 
tracking-fennec: --- → 11+
| Comment 6•13 years ago
           | ||
Comment on attachment 582497 [details] [diff] [review]
Proposed patch.
[Triage Comment]
just moves synchronization further up the stack. Also this has baked on m-c for 20 days
        Attachment #582497 -
        Flags: approval-mozilla-aurora+
| Comment 7•13 years ago
           | ||
          status-firefox11:
          --- → fixed
| Updated•4 years ago
           | 
Product: Firefox for Android → Firefox for Android Graveyard
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•