Bug 687267 - Initial support for Flash on Honeycomb r=bgirard,vlad,jgilbert,blassey

This commit is contained in:
James Willcox
2012-07-20 15:20:51 -04:00
parent 42c135b670
commit 12af787121
46 changed files with 1981 additions and 878 deletions

View File

@@ -145,6 +145,7 @@ public class GeckoAppShell
public static native void loadNSSLibsNative(String apkName, boolean shouldExtract);
public static native void onChangeNetworkLinkStatus(String status);
public static native Message getNextMessageFromQueue(MessageQueue queue);
public static native void onSurfaceTextureFrameAvailable(Object surfaceTexture, int id);
public static void registerGlobalExceptionHandler() {
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@@ -1690,35 +1691,6 @@ public class GeckoAppShell
GeckoApp.mAppContext.removePluginView(view, isFullScreen);
}
public static Surface createSurface() {
Log.i(LOGTAG, "createSurface");
return GeckoApp.mAppContext.createSurface();
}
public static void showSurface(Surface surface,
int x, int y,
int w, int h,
boolean inverted,
boolean blend)
{
Log.i(LOGTAG, "showSurface:" + surface + " @ x:" + x + " y:" + y + " w:" + w + " h:" + h + " inverted: " + inverted + " blend: " + blend);
try {
GeckoApp.mAppContext.showSurface(surface, x, y, w, h, inverted, blend);
} catch (Exception e) {
Log.i(LOGTAG, "Error in showSurface:", e);
}
}
public static void hideSurface(Surface surface) {
Log.i(LOGTAG, "hideSurface:" + surface);
GeckoApp.mAppContext.hideSurface(surface);
}
public static void destroySurface(Surface surface) {
Log.i(LOGTAG, "destroySurface:" + surface);
GeckoApp.mAppContext.destroySurface(surface);
}
public static Class<?> loadPluginClass(String className, String libName) {
Log.i(LOGTAG, "in loadPluginClass... attempting to access className, then libName.....");
Log.i(LOGTAG, "className: " + className);
@@ -2284,6 +2256,17 @@ public class GeckoAppShell
return data;
}
public static void registerSurfaceTextureFrameListener(Object surfaceTexture, final int id) {
((SurfaceTexture)surfaceTexture).setOnFrameAvailableListener(new SurfaceTexture.OnFrameAvailableListener() {
public void onFrameAvailable(SurfaceTexture surfaceTexture) {
GeckoAppShell.onSurfaceTextureFrameAvailable(surfaceTexture, id);
}
});
}
public static void unregisterSurfaceTextureFrameListener(Object surfaceTexture) {
((SurfaceTexture)surfaceTexture).setOnFrameAvailableListener(null);
}
}
class ScreenshotHandler implements Runnable {