Ejemplo n.º 1
0
 protected void finalize() throws Throwable {
   try {
     if (mBuffer != null) GeckoAppShell.freeDirectBuffer(mBuffer);
     mBuffer = null;
   } finally {
     super.finalize();
   }
 }
Ejemplo n.º 2
0
  /** Attaches the root layer to the layer controller so that Gecko appears. */
  @Override
  public void setLayerController(LayerController layerController) {
    super.setLayerController(layerController);

    layerController.setRoot(mTileLayer);
    if (mGeckoViewport != null) {
      layerController.setViewportMetrics(mGeckoViewport);
    }

    GeckoAppShell.registerGeckoEventListener("Viewport:UpdateAndDraw", this);
    GeckoAppShell.registerGeckoEventListener("Viewport:UpdateLater", this);
    GeckoAppShell.registerGeckoEventListener("Checkerboard:Toggle", this);

    sendResizeEventIfNecessary();
  }