зеркало из https://github.com/mozilla/gecko-dev.git
(Part 4) Mark all gfx functions invoked by JNI so I don't shoot myself in the foot shortly
This commit is contained in:
Родитель
614fed1c73
Коммит
abd5e1faa7
|
@ -174,7 +174,7 @@ public class GeckoGLLayerClient extends GeckoLayerClient
|
||||||
GeckoAppShell.sendEventToGecko(event);
|
GeckoAppShell.sendEventToGecko(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** For Gecko to use. */
|
/** This function is invoked by Gecko via JNI; be careful when modifying signature. */
|
||||||
public ViewTransform getViewTransform() {
|
public ViewTransform getViewTransform() {
|
||||||
Log.e(LOGTAG, "### getViewTransform()");
|
Log.e(LOGTAG, "### getViewTransform()");
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ public class GeckoGLLayerClient extends GeckoLayerClient
|
||||||
renderRequested();
|
renderRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** For Gecko to use. */
|
/** This function is invoked by Gecko via JNI; be careful when modifying signature. */
|
||||||
public LayerRenderer.Frame createFrame() {
|
public LayerRenderer.Frame createFrame() {
|
||||||
// Create the shaders and textures if necessary.
|
// Create the shaders and textures if necessary.
|
||||||
if (!mLayerRendererInitialized) {
|
if (!mLayerRendererInitialized) {
|
||||||
|
@ -230,12 +230,12 @@ public class GeckoGLLayerClient extends GeckoLayerClient
|
||||||
return mLayerRenderer.createFrame(pageContext, screenContext);
|
return mLayerRenderer.createFrame(pageContext, screenContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** For Gecko to use. */
|
/** This function is invoked by Gecko via JNI; be careful when modifying signature. */
|
||||||
public void activateProgram() {
|
public void activateProgram() {
|
||||||
mLayerRenderer.activateProgram();
|
mLayerRenderer.activateProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** For Gecko to use. */
|
/** This function is invoked by Gecko via JNI; be careful when modifying signature. */
|
||||||
public void deactivateProgram() {
|
public void deactivateProgram() {
|
||||||
mLayerRenderer.deactivateProgram();
|
mLayerRenderer.deactivateProgram();
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,7 @@ public abstract class GeckoLayerClient implements GeckoEventListener {
|
||||||
sendResizeEventIfNecessary();
|
sendResizeEventIfNecessary();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This function is invoked by Gecko via JNI; be careful when modifying signature. */
|
||||||
public Rect beginDrawing(int width, int height, int tileWidth, int tileHeight,
|
public Rect beginDrawing(int width, int height, int tileWidth, int tileHeight,
|
||||||
String metadata, boolean hasDirectTexture) {
|
String metadata, boolean hasDirectTexture) {
|
||||||
Log.e(LOGTAG, "### beginDrawing " + width + " " + height + " " + tileWidth + " " +
|
Log.e(LOGTAG, "### beginDrawing " + width + " " + height + " " + tileWidth + " " +
|
||||||
|
@ -196,7 +197,8 @@ public abstract class GeckoLayerClient implements GeckoEventListener {
|
||||||
return bufferRect;
|
return bufferRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/** This function is invoked by Gecko via JNI; be careful when modifying signature.
|
||||||
|
*
|
||||||
* TODO: Would be cleaner if this took an android.graphics.Rect instead, but that would require
|
* TODO: Would be cleaner if this took an android.graphics.Rect instead, but that would require
|
||||||
* a little more JNI magic.
|
* a little more JNI magic.
|
||||||
*/
|
*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче