зеркало из https://github.com/mozilla/gecko-dev.git
Bug 711333 - Fix race condition when moving and updating textures. r=kats
This commit is contained in:
Родитель
afc84c287e
Коммит
17740715b0
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче