forked from mirrors/gecko-dev
		
	Bug 711333 - Fix race condition when moving and updating textures. r=kats
This commit is contained in:
		
							parent
							
								
									afc84c287e
								
							
						
					
					
						commit
						17740715b0
					
				
					 1 changed files with 23 additions and 23 deletions
				
			
		| 
						 | 
				
			
			@ -180,7 +180,6 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL
 | 
			
		|||
            mGeckoViewport.setSize(viewportSize);
 | 
			
		||||
 | 
			
		||||
            LayerController controller = getLayerController();
 | 
			
		||||
            synchronized (controller) {
 | 
			
		||||
            PointF displayportOrigin = mGeckoViewport.getDisplayportOrigin();
 | 
			
		||||
            mTileLayer.setOrigin(PointUtils.round(displayportOrigin));
 | 
			
		||||
            mTileLayer.setResolution(mGeckoViewport.getZoomFactor());
 | 
			
		||||
| 
						 | 
				
			
			@ -196,7 +195,6 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL
 | 
			
		|||
                controller.setViewportMetrics(mGeckoViewport);
 | 
			
		||||
                controller.abortPanZoomAnimation();
 | 
			
		||||
            }
 | 
			
		||||
            }
 | 
			
		||||
        } catch (JSONException e) {
 | 
			
		||||
            Log.e(LOGTAG, "Bad viewport description: " + viewportDescription);
 | 
			
		||||
            throw new RuntimeException(e);
 | 
			
		||||
| 
						 | 
				
			
			@ -208,6 +206,7 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL
 | 
			
		|||
     * a little more JNI magic.
 | 
			
		||||
     */
 | 
			
		||||
    public void endDrawing(int x, int y, int width, int height, String metadata) {
 | 
			
		||||
        synchronized (getLayerController()) {
 | 
			
		||||
            try {
 | 
			
		||||
                updateViewport(metadata, !mUpdateViewportOnEndDraw);
 | 
			
		||||
                mUpdateViewportOnEndDraw = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -219,6 +218,7 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL
 | 
			
		|||
                endTransaction(mTileLayer);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public ViewportMetrics getGeckoViewportMetrics() {
 | 
			
		||||
        // Return a copy, as we modify this inside the Gecko thread
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue