Backed out 7 changesets (bug 913985) for intermittent Android crashes.

Backed out changeset 53513a959cf0 (bug 913985)
Backed out changeset d23d1e678417 (bug 913985)
Backed out changeset a9c9187b4f4a (bug 913985)
Backed out changeset c6b02e4a3e35 (bug 913985)
Backed out changeset 895dae322e3c (bug 913985)
Backed out changeset 3d97e6a53313 (bug 913985)
Backed out changeset 892bb017f8ba (bug 913985)
This commit is contained in:
Ryan VanderMeulen
2013-11-19 10:56:09 -05:00
parent cfcdfb46e2
commit 4501219603
81 changed files with 2071 additions and 4469 deletions

View File

@@ -11,7 +11,6 @@ import org.mozilla.gecko.GeckoEvent;
import org.mozilla.gecko.Tab;
import org.mozilla.gecko.Tabs;
import org.mozilla.gecko.ZoomConstraints;
import org.mozilla.gecko.mozglue.generatorannotations.WrapElementForJNI;
import org.mozilla.gecko.util.EventDispatcher;
import org.mozilla.gecko.util.FloatUtils;
import org.mozilla.gecko.util.ThreadUtils;
@@ -414,7 +413,7 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
return mDisplayPort;
}
@WrapElementForJNI
/* This is invoked by JNI on the gecko thread */
DisplayPortMetrics getDisplayPort(boolean pageSizeUpdate, boolean isBrowserContentDisplayed, int tabId, ImmutableViewportMetrics metrics) {
Tabs tabs = Tabs.getInstance();
if (isBrowserContentDisplayed && tabs.isSelectedTabId(tabId)) {
@@ -431,12 +430,12 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
}
}
@WrapElementForJNI
/* This is invoked by JNI on the gecko thread */
void contentDocumentChanged() {
mContentDocumentIsDisplayed = false;
}
@WrapElementForJNI
/* This is invoked by JNI on the gecko thread */
boolean isContentDocumentDisplayed() {
return mContentDocumentIsDisplayed;
}
@@ -446,7 +445,6 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
// to abort the current update and continue with any subsequent ones. This
// is useful for slow-to-render pages when the display-port starts lagging
// behind enough that continuing to draw it is wasted effort.
@WrapElementForJNI(allowMultithread = true)
public ProgressiveUpdateData progressiveUpdateCallback(boolean aHasPendingNewThebesContent,
float x, float y, float width, float height,
float resolution, boolean lowPrecision) {
@@ -554,13 +552,13 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
}
}
/** The compositor invokes this function just before compositing a frame where the document
/** This function is invoked by Gecko via JNI; be careful when modifying signature.
* The compositor invokes this function just before compositing a frame where the document
* is different from the document composited on the last frame. In these cases, the viewport
* information we have in Java is no longer valid and needs to be replaced with the new
* viewport information provided. setPageRect will never be invoked on the same frame that
* this function is invoked on; and this function will always be called prior to syncViewportInfo.
*/
@WrapElementForJNI(allowMultithread = true)
public void setFirstPaintViewport(float offsetX, float offsetY, float zoom,
float cssPageLeft, float cssPageTop, float cssPageRight, float cssPageBottom) {
synchronized (getLock()) {
@@ -613,12 +611,12 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
mContentDocumentIsDisplayed = true;
}
/** The compositor invokes this function whenever it determines that the page rect
/** This function is invoked by Gecko via JNI; be careful when modifying signature.
* The compositor invokes this function whenever it determines that the page rect
* has changed (based on the information it gets from layout). If setFirstPaintViewport
* is invoked on a frame, then this function will not be. For any given frame, this
* function will be invoked before syncViewportInfo.
*/
@WrapElementForJNI(allowMultithread = true)
public void setPageRect(float cssPageLeft, float cssPageTop, float cssPageRight, float cssPageBottom) {
synchronized (getLock()) {
RectF cssPageRect = new RectF(cssPageLeft, cssPageTop, cssPageRight, cssPageBottom);
@@ -631,7 +629,8 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
}
}
/** The compositor invokes this function on every frame to figure out what part of the
/** This function is invoked by Gecko via JNI; be careful when modifying signature.
* The compositor invokes this function on every frame to figure out what part of the
* page to display, and to inform Java of the current display port. Since it is called
* on every frame, it needs to be ultra-fast.
* It avoids taking any locks or allocating any objects. We keep around a
@@ -639,7 +638,6 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
* everytime we're called. NOTE: we might be able to return a ImmutableViewportMetrics
* which would avoid the copy into mCurrentViewTransform.
*/
@WrapElementForJNI(allowMultithread = true)
public ViewTransform syncViewportInfo(int x, int y, int width, int height, float resolution, boolean layersUpdated) {
// getViewportMetrics is thread safe so we don't need to synchronize.
// We save the viewport metrics here, so we later use it later in
@@ -693,7 +691,7 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
return mCurrentViewTransform;
}
@WrapElementForJNI(allowMultithread = true)
/* Invoked by JNI from the compositor thread */
public ViewTransform syncFrameMetrics(float offsetX, float offsetY, float zoom,
float cssPageLeft, float cssPageTop, float cssPageRight, float cssPageBottom,
boolean layersUpdated, int x, int y, int width, int height, float resolution,
@@ -707,7 +705,7 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
return syncViewportInfo(x, y, width, height, resolution, layersUpdated);
}
@WrapElementForJNI(allowMultithread = true)
/** This function is invoked by Gecko via JNI; be careful when modifying signature. */
public LayerRenderer.Frame createFrame() {
// Create the shaders and textures if necessary.
if (!mLayerRendererInitialized) {
@@ -719,12 +717,12 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
return mLayerRenderer.createFrame(mFrameMetrics);
}
@WrapElementForJNI(allowMultithread = true)
/** This function is invoked by Gecko via JNI; be careful when modifying signature. */
public void activateProgram() {
mLayerRenderer.activateDefaultProgram();
}
@WrapElementForJNI(allowMultithread = true)
/** This function is invoked by Gecko via JNI; be careful when modifying signature. */
public void deactivateProgram() {
mLayerRenderer.deactivateDefaultProgram();
}