提交 51783ee3 编写于 作者: J James Willcox

Bug 1296298 - Don't try to add a presentation surface unless Gecko is running...

Bug 1296298 - Don't try to add a presentation surface unless Gecko is running on a CLOSED TREE. r=jchen a=lizzard

--HG--
extra : source : 8f259d3c70b9192923644f3317eb670ab06e3c13
extra : intermediate-source : e94a437349ec82689401325cccef721cf162c30e
上级 86c0ba44
......@@ -100,18 +100,24 @@ public class PresentationMediaPlayerManager extends MediaPlayerManager {
public void surfaceChanged(SurfaceHolder holder, int format, int width,
int height) {
// Surface changed so force a composite
GeckoAppShell.invalidateAndScheduleComposite();
if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {
GeckoAppShell.invalidateAndScheduleComposite();
}
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
GeckoAppShell.addPresentationSurface(holder.getSurface());
GeckoAppShell.invalidateAndScheduleComposite();
if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {
GeckoAppShell.addPresentationSurface(holder.getSurface());
GeckoAppShell.invalidateAndScheduleComposite();
}
}
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
GeckoAppShell.removePresentationSurface(holder.getSurface());
if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {
GeckoAppShell.removePresentationSurface(holder.getSurface());
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册