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);
 | 
					            mGeckoViewport.setSize(viewportSize);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            LayerController controller = getLayerController();
 | 
					            LayerController controller = getLayerController();
 | 
				
			||||||
            synchronized (controller) {
 | 
					 | 
				
			||||||
            PointF displayportOrigin = mGeckoViewport.getDisplayportOrigin();
 | 
					            PointF displayportOrigin = mGeckoViewport.getDisplayportOrigin();
 | 
				
			||||||
            mTileLayer.setOrigin(PointUtils.round(displayportOrigin));
 | 
					            mTileLayer.setOrigin(PointUtils.round(displayportOrigin));
 | 
				
			||||||
            mTileLayer.setResolution(mGeckoViewport.getZoomFactor());
 | 
					            mTileLayer.setResolution(mGeckoViewport.getZoomFactor());
 | 
				
			||||||
| 
						 | 
					@ -196,7 +195,6 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL
 | 
				
			||||||
                controller.setViewportMetrics(mGeckoViewport);
 | 
					                controller.setViewportMetrics(mGeckoViewport);
 | 
				
			||||||
                controller.abortPanZoomAnimation();
 | 
					                controller.abortPanZoomAnimation();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        } catch (JSONException e) {
 | 
					        } catch (JSONException e) {
 | 
				
			||||||
            Log.e(LOGTAG, "Bad viewport description: " + viewportDescription);
 | 
					            Log.e(LOGTAG, "Bad viewport description: " + viewportDescription);
 | 
				
			||||||
            throw new RuntimeException(e);
 | 
					            throw new RuntimeException(e);
 | 
				
			||||||
| 
						 | 
					@ -208,6 +206,7 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL
 | 
				
			||||||
     * a little more JNI magic.
 | 
					     * a little more JNI magic.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public void endDrawing(int x, int y, int width, int height, String metadata) {
 | 
					    public void endDrawing(int x, int y, int width, int height, String metadata) {
 | 
				
			||||||
 | 
					        synchronized (getLayerController()) {
 | 
				
			||||||
            try {
 | 
					            try {
 | 
				
			||||||
                updateViewport(metadata, !mUpdateViewportOnEndDraw);
 | 
					                updateViewport(metadata, !mUpdateViewportOnEndDraw);
 | 
				
			||||||
                mUpdateViewportOnEndDraw = false;
 | 
					                mUpdateViewportOnEndDraw = false;
 | 
				
			||||||
| 
						 | 
					@ -219,6 +218,7 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL
 | 
				
			||||||
                endTransaction(mTileLayer);
 | 
					                endTransaction(mTileLayer);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public ViewportMetrics getGeckoViewportMetrics() {
 | 
					    public ViewportMetrics getGeckoViewportMetrics() {
 | 
				
			||||||
        // Return a copy, as we modify this inside the Gecko thread
 | 
					        // Return a copy, as we modify this inside the Gecko thread
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue